Anthony C Anthony C - 1 year ago 92
iOS Question

Can CloudKit user phone numbers be retrieved using `CKDiscoverAllUserIdentitiesOperation`?


I am retrieving all the users for my app using the recommended CloudKit operation,

This operation is designed to returns each user's info in a
object. The
attribute of the user identity has fields that can contain the user's email address and the user's phone number.




When I run this operation, I only ever get each user's email address. The
field is never populated.

How do I retrieve these user identities and have them include the user's phone number? (Is this possible?)

Additional Info

I am able to retrieve individual users with their phone numbers using the
CloudKit function, so I know that these accounts are linked to phone numbers.

Answer Source

All you get is the email. That's it. It's not possible to get any more info than that using CKDiscoverAllUserIdentitiesOperation. And that is only for users that have agreed to be looked up via email while using your app.

The only time the phone number is filled in is if you specifically lookup the user by phone number. Of course that's kind of pointless since you already know the phone number.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download