Here's the goal:
- User A and User B are users of the app.
- They are using separate devices logged into separate iCloud accounts.
- Both users enable discoverability in the app.
- Once enabled, User A can see that User B is using the app, and vice versa (assuming both have each other's iCloud emails in their contact books).
Currently, I've followed through the following steps, but discoverAllContactUserInfosWithCompletionHandler returns empty.
I'm stumped. I've:
- Configured the app for CloudKit
- Am checking the status with
accountStatusWithCompletionHandler. I am receivingaccountStatus == .Available - Check discovery permission with
statusForApplicationPermission(CKApplicationPermissions.PermissionUserDiscoverability). I am receivingpermissionStatus == .Granted - I now request app users using
discoverAllContactUserInfosWithCompletionHandler. In the completion block, I receive no error and an empty users array. I've also tried usingdiscoverUserInfoWithEmailAddressto pull a user that I've registered with on a separate device. This returns a nil user object, but no error.
I'm not sure what I'm missing here. Any advice/troubleshooting tips would be much appreciated.