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:
- On the simulator, Settings --> General --> Rest --> Reset Location & Privacy has no effect.
- Also on the simulator, "Reset Content and Settings..." has no effect.
- Trying on a different Mac, with a different device, produces exactly the same results.
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?