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

Requesting for Addressbook access #44

Closed
rahuljiresal opened this issue Dec 5, 2014 · 8 comments
Closed

Requesting for Addressbook access #44

rahuljiresal opened this issue Dec 5, 2014 · 8 comments

Comments

@rahuljiresal
Copy link
Contributor

Currently, if the app does not have access to the Address Book, it never asks for it. It only returns APAddressBookAccessUnknown on [APAddressBook access].

You should add an API for requesting the access to the address book. Something like

+ (void)requestAccessWithCompletionBlock:(void(^)(void)block;

@mohpor
Copy link

mohpor commented Dec 24, 2014

Second it. It's a much needed feature.

@lopezjurip
Copy link

+1

@eriknelson
Copy link

This should probably at least be mentioned in the documentation. +1

@belkevich
Copy link
Contributor

Check out version 0.1.10

@bgd011
Copy link

bgd011 commented Jun 16, 2015

Apple's comments for "ABAddressBookRequestAccessWithCompletion" say
"...
// The user will only be prompted the first time access is requested; any subsequent calls
// to ABAddressBookCreateWithOptions will use the existing permissions.
..."
So I don't think any subsequent calls to it will do anything. I have tested the new requestAccess method and it does not seem to do anything.

@belkevich
Copy link
Contributor

It runs block with existing permissions after first call.
Sorry, looks like I don't understand your question. What exactly do you mean?

@bgd011
Copy link

bgd011 commented Jun 16, 2015

I just meant that I tested requestAccess method vs just loadContacts and I am not sure of the benefits of first checking for access and calling requestAccess if it is not granted.
Both methods call ABAddressBookRequestAccessWithCompletion and this method will behave the same.
So calling loadContacts pretty much does the same as requestAccess plus more. Maybe some documentation that explains when to use the requestAccess method, because I did not find a use case.

@belkevich
Copy link
Contributor

I'm agree with you. It's hard to find a use case)) But community want this method, so we add it))

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

6 participants