I'm testing code that requests discoverability via CloudKit:
CKContainer.defaultContainer().requestApplicationPermission(CKApplicationPermissions.PermissionUserDiscoverability, completionHandler: { (status:CKApplicationPermissionStatus, error:NSError!) -> Void in
if status == CKApplicationPermissionStatus.Granted {
...
} else if status == CKApplicationPermissionStatus.Denied {
....
} else {
println("Request result: \(status)")
}
})
But how do I reset the result of this? I get asked once and never again, even if I delete and reinstall the app. If I run this code again, I get into the completion block immediately with the same result as last time.
I saw another question and a post on Apple's old forums (login required) that said it could be reset by going to Settings --> iCloud --> iCloud Drive --> Look Me Up By Email. However doing that doesn't give me any option to do anything:
I'm sure I could reset it by something like Settings --> General --> Reset --> Reset All Settings (or maybe Reset Network Settings) [but see additional info on this], but there must be some way to reset the CloudKit permission without nuking a bunch of unrelated settings. What if a user denies permission but later changes their mind?
Update: Some additional info:
The above lead me to suspect it's a server-side setting. So I tried logging into iCloud.com with the account I'm using, and went to Settings --> Data & Security --> Look Me Up By Email. As on iOS devices and simulators, there is no option there to do anything at all:
So, is there any way at all to reset this, or is it fixed in stone and unchangeable until the sun expands and destroys the Earth?
Before the sun expands and destroys the earth, this setting can be reset as follows:
Development
environmentDeployment
tab on the left, under Admin
Reset Development Environment
button on the top right.(These instructions only work for the Development
environment.)
The "Look Me Up By Email" settings currently only show your preferences in the production environment. If your app is running in the development environment there's no way to reset those settings at the moment. You're correct that the setting is stored on the server.
This is a known bug. Until it gets fixed the work around is to test this feature while your app is deployed for production. You can create a second container to use for testing this if you want to avoid testing in your shipping app's production container.
Only way I found is reseting development environment from CloudKit dashboard, app will ask for permission again, this will delete all your data though
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With