如何申请再次访问iphone联系人地址簿的许可?

问题描述:

我要求使用以下代码访问我的联系人。

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 
         {

         }

到目前为止一切正常,但是如果我删除应用程序并再次调试应用程序不会再次请求我的许可。如果我接受或拒绝我之前可以看到它在隐私联系人和我的应用程序的名称,无论是ON还是OFF。

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?


您可以重设您的隐私设置。

You can reset your privacy settings.


设置>常规>重置>重置位置&隐私。

Settings > General > Reset > Reset Location & Privacy.