iphone - 如何再次请求访问 iphone 通讯录地址簿的权限?

标签 iphone ios ios6 abaddressbook

我正在请求使用以下代码访问我的联系人的权限。

    ABAddressBookRef addressBookRef = ABAddressBookCreateWithOptions(NULL, NULL);

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

         }
         else 
         {

         }

到目前为止一切正常,但是如果我删除该应用程序并再次调试,该应用程序将不会再次询问我的许可。在此之前,如果我接受或拒绝,我可以在隐私联系人中看到它以及我的应用程序的名称,无论它是打开还是关闭。

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?

最佳答案

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

Settings > General > Reset > Reset Location & Privacy.

关于iphone - 如何再次请求访问 iphone 通讯录地址簿的权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16478053/

相关文章:

iphone - 同时记录和播放同一文件

ios - 当应用在后台时,iOS 上不显示通知(使用 Firebase 发送)

ios - 5 秒后调用一个方法。没有 NSTimer

打开新窗口时的 iOS UIWebView 事件

ios - 截图/分享 MapView 发送邮件-iOS

android - 如何在 iphone 中使用 PKCS5padding 和 AES128

javascript - (iOS) 在 UIWebView 中运行小书签?

Iphone:应用可行性

ios - 将按钮放在屏幕的左下角

iphone - 如何显示 CFStringType?喜欢 kABHomeLabel