firescript / nativescript-contacts

A nativescript module that gives access to the native contact directory.
MIT License
28 stars 32 forks source link

ios permissions #10

Closed supafoundation closed 5 years ago

supafoundation commented 8 years ago

Hi

Could I please find out where is the code that prompts access to contacts permissions to be granted on ios? And how to check if this is granted. I did a bit of googling i think for ios its CNAuthorizationStatus and requestAccessForEntityType Could you please integrate to check if access is granted for both ios and android? Wont take you long but will take me ages.

Thanks

alv909 commented 6 years ago

where is the code that prompts access to contacts permissions to be granted on ios?

For iOS 10+, add this to your Info.plist file (App_Resources\iOS) and the user will be prompted as soon as your code makes a call to CNContactStore:

Privacy - Contacts Usage Description This application requires access to your contacts.

See also: https://developer.apple.com/documentation/contacts. Hope that helps.

jzgoda commented 5 years ago

Docs have been updated to show how to avoid this issue.