alexrothenberg
alexrothenberg

Reputation: 184

In IOS6 Simulator ABAddressBookGetAuthorizationStatus() always returns kABAuthorizationStatusAuthorized

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

  1. "Reset Location & Privacy" within Setting->General->Reset and
  2. reset then entire simulator from the OSX menu IOS Simulator->Reset Content and Settings

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

Answers (2)

marmor
marmor

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

algal
algal

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

Related Questions