Post not yet marked as solved
Post marked as unsolved with 1 replies, 679 views
There seems to be an API for this, but it's always returning nil. Here's my code: CKContainer.default().requestApplicationPermission(.userDiscoverability) { status, error in
CKContainer.default().fetchUserRecordID { id, error in
guard let id = id else { return }
CKContainer.default().discoverUserIdentity(withUserRecordID: id) { info, error in
if let info = info {
print("Got an email: \(info.lookupInfo?.emailAddress ?? "-none-")
}
}
}the email address field in the lookupInfo structure is always nil. Was this functionality removed?Thanks!Ben