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.