Skip to content

Instantly share code, notes, and snippets.

Created October 10, 2012 11:01
Show Gist options
  • Select an option

  • Save anonymous/3864790 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/3864790 to your computer and use it in GitHub Desktop.
//method 1 (existing)
ABAddressBookRef ref = ABAddressBookCreate();
ABAddressBookRequestAccessWithCompletion(ref, ^(bool granted, CFErrorRef error) {
//NSLog(@"Granted Contacts Access: %@",granted ? @"YES" : @"NO");
});
CFRelease(ref);
//method 2 (i think this will fix it)
ABAddressBookRef ref = ABAddressBookCreate();
ABAddressBookRequestAccessWithCompletion(ref, ^(bool granted, CFErrorRef error) {
//NSLog(@"Granted Contacts Access: %@",granted ? @"YES" : @"NO");
});
ref = nil;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment