Skip to content
Snippets Groups Projects
Commit d0b2595b authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Add XXClient.Contact helpers

parent f97470fb
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!68Messenger example - send auth request
......@@ -53,6 +53,7 @@ let package = Package(
name: "AppCore",
dependencies: [
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
.product(name: "XXClient", package: "elixxir-dapps-sdk-swift"),
.product(name: "XXDatabase", package: "client-ios-db"),
.product(name: "XXModels", package: "client-ios-db"),
],
......
import XXClient
extension Contact {
public var username: String? {
try? getFacts().first(where: { $0.type == 0 })?.fact
}
public var email: String? {
try? getFacts().first(where: { $0.type == 1 })?.fact
}
public var phone: String? {
try? getFacts().first(where: { $0.type == 2 })?.fact
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment