Skip to content

Failed to create RHAddressBookSharedServices instance #63

@rlaferla

Description

@rlaferla

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);
       }];
  }
'''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions