CKContainer.discoverAllIdentities(completionHandler:), discoverUserIdentity(recordID: - completion handler returns CKUserIdentity but .lookupInfo is always nil even when contacts contain email, phone, etc. Other properties such as hasiCloudAccount, userRecordID, nameComponents are fine. This issue just started happening with recent Swift 3.1 release. Does anyone know if this is intended behavior as I have not been able to find any reference to CloudKit changes in release notes but this is looking like a privacy thing.
After further investigation, it appears that this issue might be due to the recent iOS 10.3 update. When running the app on an iPhone 5 with 10.2.1 the problem does not occur and lookupInfo properly contains emailAddress
Submitted Apple bug: 31377433
NEW: In addition, if I try to access information via CKDiscoverAllUserIdentitiesOperation, in particular userIdentityDiscoveredBlock -> user.nameComponents the result is "empty string" for apple id's associated with users who are under 12 years old (and potentially on the "Family Sharing" plan). I've found no information about this and apple dev support offered no help either.
Since I can´t put a comment because of missing reputation, I have to do it this way...
I also submitted the same bug (31397767) and hope they will fix it.
For
CKFetchShareParticipantsOperation
it is necessary to haveCKUserIdentityLookupInfo
. Since there is no workaround we need to wait for them to fix it.I'm just curious about this bug because if you already submitted your app to the app store the whole sharing part would not work for the users.
Update
iOS 10.3.1 update didn't solve the issue.
Update: Solution
I got a response from Apple about this "issue". Here is the answer c&p: