Reputation: 184
This is the same question as ABAddressBookGetAuthorizationStatus in simulator always returns kABAuthorizationStatusAuthorized but that answer did not work for me and I don't have enough reputation to comment on that thread :(
In the IOS6 Simulator ABAddressBookGetAuthorizationStatus()
always returns kABAuthorizationStatusAuthorized
. I am looking for a way to "reset" the simulator so I can get it to ask the user "
I've tried resetting with
I still always get authorized
if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusAuthorized)
// I get in here every time
else
// I NEVER get here, but I should
Upvotes: 3
Views: 1928
Reputation: 28171
Seems like simulator
always returns granted, so no permission request is needed, and reseting wouldn't help either.
On real devices you can first get "Not Determined
", and then a permanent "Denied
" or "Authorized
", until the user goes to Settings > general > reset > reset location & privacy
.
Upvotes: 2
Reputation: 28094
This may be a dumb question but have you tried resetting the per-app privacy settings in the simulator?
(They are at: Settings.app / Privacy / Contacts / your-app-here )
Upvotes: 0