joshuapinter / react-native-unified-contacts

Your best friend when working with the latest and greatest Contacts Framework in iOS 9+ in React Native.
MIT License
158 stars 56 forks source link

Add method for checking if we have already checked permission #49

Closed paintedbicycle closed 6 years ago

paintedbicycle commented 6 years ago

This PR adds a method for allowing a developer to check if we have already checked for permissions.

This allows the developer to treat the UI in the “third state”, where it’s not “yes” or “no” to contacts, but also “undefined”.

This allows to developer to create UI such as “Request Access to Contacts” vs “You have chosen to not allow contacts”. Right now, there is only truthy/falsy

joshuapinter commented 6 years ago

👍