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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…