Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ABAddressBookGetAuthorizationStatus in simulator always returns kABAuthorizationStatusAuthorized

I am updating an app for iOS 6 Address Book authorization and have hit a problem in testing. The simulator always returns that authorization is granted. This means I do not see the dialog popup requesting permission and can therefore not test that code path. Ok, use a device instead... The problem there is the OS appears to remember my answer so only asks once. Deleting the app does not help. On reinstalling it has retained the permission setting from before, so again no popup.

Resetting the simulator does not help and if you go into the Privacy settings on the simulator no apps are listed as requesting permission to the Address Book.

The only option I have is use another iOS device that has never had our app installed on for each test. This cannot be how you are supposed to test this. Any ideas anyone?

Thanks

like image 201
PGraham Avatar asked Dec 11 '22 22:12

PGraham


1 Answers

Found it. From the device, Settings->General->Reset->Reset Location & Privacy. So you have to do that for each test

like image 140
PGraham Avatar answered Dec 28 '22 08:12

PGraham