Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create RHAddressBookSharedServices instance #63

Open
rlaferla opened this issue Oct 14, 2014 · 0 comments
Open

Failed to create RHAddressBookSharedServices instance #63

rlaferla opened this issue Oct 14, 2014 · 0 comments

Comments

@rlaferla
Copy link

On iOS 8.0.2, I'm getting this error:

-[RHAddressBookSharedServices init]:130 Error: Failed to create RHAddressBookSharedServices instance. Underlying ABAddressBookCreateWithOptions() failed with error: Error Domain=ABAddressBookErrorDomain Code=1 "The operation couldn’t be completed. (ABAddressBookErrorDomain error 1.

In iOS 8, most requestAuthorization requests are CLASS methods vs. INSTANCE methods. This way, the API can check for authorization before creating an instance.

        if ([RHAddressBook authorizationStatus] != RHAuthorizationStatusAuthorized) {
        RHAddressBook * addressBook =  [[RHAddressBook alloc] init];
        [addressBook requestAuthorizationWithCompletion:^(bool granted, NSError *error) {
           NSLog(@"authorization granted=%d", granted);
       }];
  }
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant