Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS 6 contacts access alert never showed on debug
    text
    copied!<p>My app on the appstore is accessing the iPhone contacts, after the users downloaded it on iOS 6 it can't access the iPhone contacts while its working fine on iOS 5 the problem is the new privacy settings apple has put in iOS 6 .. so after searching i found out that i have to do the following in my code to be able to access the user contacts:</p> <pre><code> //in order to test addressbook availability we have to attempt to create an addressbook instance using ABAddressBookCreateWithOptions #if __IPHONE_OS_VERSION_MAX_ALLOWED &gt;= 60000 // Request authorization to Address Book ABAddressBookRef addressBookRef = ABAddressBookCreateWithOptions(NULL, NULL); if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined) { ABAddressBookRequestAccessWithCompletion(addressBookRef, ^(bool granted, CFErrorRef error) { if (granted) [self loadContacts]; }); } else if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusAuthorized) { // The user has previously given access, add the contact [self loadContact]; } else { } #endif //end iOS6+ //ABAddressBookCreateWithOptions not available or succeeded. return YES; [self loadContacts]; </code></pre> <p>My problem now is while debugging on the device, the alert is not showing, i don't know why ? I know that the above code should work fine, but only when the app is submitted to the appstore but i want to test that in debug mode before submission ? Any advice ?</p> <p>Appreciate your support. Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload