Programmatically Request Access to Contacts in iOS 6
iOS 6 Address Book not working?
How do I correctly use ABAddressBookCreateWithOptions method in iOS6?
iOS 6 Address Book not working?
How do I correctly use ABAddressBookCreateWithOptions method in iOS6?
Request Permission
ABAddressBookRef addressBookRef = ABAddressBookCreateWithOptions(NULL, NULL);
if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined) {
ABAddressBookRequestAccessWithCompletion(addressBookRef, ^(bool granted, CFErrorRef error) {
// Do whatever you need.
});
}
沒有留言:
張貼留言