Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ask for permission to access iphone contacts addressbook again?

I am asking permission to access my contacts using the code below.

    ABAddressBookRef addressBookRef = ABAddressBookCreateWithOptions(NULL, NULL);

    if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined) {
        ABAddressBookRequestAccessWithCompletion(addressBookRef, ^(bool granted, CFErrorRef error) {
}
else if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusAuthorized) 
         {

         }
         else 
         {

         }

So far everything is working but however if I delete the app and debug again the app wont ask me the permission again. Prior to if I accepted or declined I can see it in privacy contacts and the name of my app whether its ON or OFF.

I want the app to ask me the permission pop up. what should i do restart the device and reinstall the app. Anyway to clear some sort of cache?

like image 649
droidiphonereef Avatar asked May 10 '13 08:05

droidiphonereef


1 Answers

You can reset your privacy settings.

Settings > General > Reset > Reset Location & Privacy.

like image 105
R.Lambert Avatar answered Sep 20 '22 22:09

R.Lambert