我正在请求使用以下代码访问我的联系人的权限。
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/