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

AddressBok and ios5 issue #3

Open
jonasman opened this issue Apr 12, 2013 · 0 comments
Open

AddressBok and ios5 issue #3

jonasman opened this issue Apr 12, 2013 · 0 comments

Comments

@jonasman
Copy link

I would replace the actual method implementation of + (ABAddressBookRef) addressBook;

to:

  • (ABAddressBookRef) addressBook
    {
    if (shared) return shared;

    CFErrorRef errorRef;

    if (&ABAddressBookCreateWithOptions != NULL){
    shared = ABAddressBookCreateWithOptions(NULL, &errorRef);
    }
    else
    {
    shared = ABAddressBookCreate();
    }

    if (!shared)
    {
    NSError *error = (__bridge_transfer NSError *)errorRef;
    NSLog(@"Error creating new address book object: %@", error.localizedFailureReason);
    return nil;
    }

    //ABAddressBookRegisterExternalChangeCallback(shared, addressBookUpdated, NULL);
    return shared;
    }

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