Requests the specified permission from the user to make the user’s identity discoverable.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
The requested permission. This requested permission applies to the current container only and will not impact permissions granted for other containers. For a list of possible values, see
The block to execute with the results. Your block must be capable of executing on any thread of the app.
To implement social features in your app, it is possible to correlate a user record with the user’s actual name, but your app must get permission from the user to do so. Making a user record discoverable to the friends (contacts) of that user involves calling the the
request method and asking for the
CKApplication permission. When you call that method, CloudKit asks the user on your behalf whether the user record should be made discoverable. If the user grants the request, that user’s contacts can discover that user’s true identity when running the app. To discover the contacts of the current user, you use the
discover method or one of several other methods to get the related user information.
The first time you request a permission on any of the user’s devices, the user is prompted to grant or deny the request. Once the user grants or denies a permission, subsequent requests for the same permission (on the same or separate devices), do not prompt the user again.
This method runs asynchronously and delivers the results to the block you provide.