In this excellent post / answer: Anonymously Log In to an App with iCloud Apple ID there is discussion about how to retrieve an app-specific ID for a user (fetchUserRecordIDWithCompletionHandler:
method on CKContainer
).
Further, there is discussion about how to request additional details from the user (fetchRecordWithID:completionHandler:
).
My question (I don't have a Apple Developer account) is: what do these two steps look like (if applicable) to the end-user? Specifically,
Screenshots or examples of apps currently using this framework are greatly appreciated.
The call to fetchRecordWithID:
doesn't actually prompt the user. The record fetched will be empty, but you can store any values you'd like on it.
If you make the current user discoverable in your container then:
Becoming discoverable exposes information about the user to other users of that container, so CloudKit will prompt the user with an alert to make sure they want to become discoverable.
You can request discoverability permissions by calling -[CKContainer requestApplicationPermission:CKApplicationPermissionUserDiscoverability...]