react-native-contacts
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "React Native Contacts (android & ios)", | ||
@@ -10,0 +10,0 @@ "nativePackage": true, |
@@ -12,3 +12,3 @@ # React Native Contacts | ||
if (err) throw err; | ||
// contacts returned | ||
@@ -26,3 +26,3 @@ console.log(contacts) | ||
if (err) throw err; | ||
// contacts matching "filter" | ||
@@ -40,3 +40,3 @@ console.log(contacts) | ||
react-native link react-native-contacts | ||
or if you use yarn: | ||
@@ -53,3 +53,3 @@ | ||
### iOS Permissions | ||
### iOS Permissions | ||
@@ -64,4 +64,5 @@ As of Xcode 8 and React Native 0.33 it is now **necessary to add kit specific "permission" keys** to your Xcode `Info.plist` file, in order to make `requestPermission` work. Otherwise your app crashes when requesting the specific permission. I discovered this after days of frustration. | ||
### Android Permissions | ||
Android requires allowing permsssions with https://facebook.github.io/react-native/docs/permissionsandroid.html | ||
### Android Permissions | ||
Android requires allowing permissions with https://facebook.github.io/react-native/docs/permissionsandroid.html | ||
The `READ_CONTACTS` permission is automatically added to the `AndroidManifest.xml`, so you just need request it. If your app also needs to create contacts, don't forget to add `WRITE_CONTACTS` permission to the manifest and request it at runtime. | ||
@@ -79,3 +80,3 @@ ## API | ||
* `requestPermission` (callback) - request permission to access Contacts _ios only_ | ||
Callbacks follow node-style: | ||
@@ -166,3 +167,3 @@ ```sh | ||
if (err) throw err; | ||
// update the first record | ||
@@ -212,3 +213,3 @@ let someRecord = contacts[0] | ||
if (err) throw err; | ||
// Contacts.PERMISSION_AUTHORIZED || Contacts.PERMISSION_UNDEFINED || Contacts.PERMISSION_DENIED | ||
@@ -215,0 +216,0 @@ if (permission === 'undefined') { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167609
20
229