var defaultContainer = CKContainer.defaultContainer()
var publicDatabase = defaultContainer.publicCloudDatabase
defaultContainer.requestApplicationPermission(.PermissionUserDiscoverability, {status, error in
})
Requests the specified permission from the user asynchronously.
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.