How to ask for permission to access iphone contacts addressbook again?
Asked Answered
V

1

5

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?

Vulgarize answered 10/5, 2013 at 8:30 Comment(0)
C
18

You can reset your privacy settings.

Settings > General > Reset > Reset Location & Privacy.

Catinacation answered 10/5, 2013 at 8:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.