react-native-contacts
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "React Native Contacts (android & ios)", | ||
@@ -10,0 +10,0 @@ "nativePackage": true, |
@@ -7,4 +7,4 @@ # React Native Contacts | ||
```js | ||
var Contacts = require('react-native-contacts') | ||
```es | ||
import Contacts from 'react-native-contacts'; | ||
@@ -21,4 +21,4 @@ Contacts.getAll((err, contacts) => { | ||
```js | ||
var Contacts = require('react-native-contacts') | ||
```es | ||
import Contacts from 'react-native-contacts'; | ||
@@ -33,20 +33,23 @@ Contacts.getContactsMatchingString("filter", (err, contacts) => { | ||
## Installation | ||
### React Native Link | ||
with npm | ||
### With React Native Link | ||
run: | ||
npm install react-native-contacts | ||
react-native link react-native-contacts | ||
with yarn | ||
or if you use yarn: | ||
yarn add react-native-contacts | ||
and then do | ||
yarn add react-native-contacts | ||
react-native link react-native-contacts | ||
if you get an error about | ||
`import Contacts from 'react-native-contacts'; is undefined.` try manual linking | ||
below | ||
### Manual installation | ||
1. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name] | ||
1. add ./node_modules/react-native-contacts/ios/RCTContacts.xcodeproj | ||
1. In the XCode project navigator, select your project, select the Build Phases tab and in the Link Binary With Libraries section add libRCTContacts.a | ||
1. In XCode, in the project navigator, right click Libraries `Add Files to [your project's name]` | ||
1. add `./node_modules/react-native-contacts/ios/RCTContacts.xcodeproj` | ||
1. In the XCode project navigator, select your project, | ||
select the `Build Phases` tab and in the `Link Binary With Libraries` section | ||
add `libRCTContacts.a` | ||
@@ -87,3 +90,3 @@ ### iOS Permissions | ||
## Example Contact Record | ||
```js | ||
```es | ||
{ | ||
@@ -125,3 +128,3 @@ recordID: '6b2237ee0df85980', | ||
Currently all fields from the contact record except for thumbnailPath are supported for writing | ||
```js | ||
```es | ||
var newPerson = { | ||
@@ -144,3 +147,3 @@ emailAddresses: [{ | ||
Currently all fields from the contact record except for thumbnailPath are supported for writing | ||
```js | ||
```es | ||
var newPerson = { | ||
@@ -164,3 +167,3 @@ emailAddresses: [{ | ||
Example | ||
```js | ||
```es | ||
Contacts.getAll((err, contacts) => { | ||
@@ -201,3 +204,3 @@ if (err) throw err; | ||
```js | ||
```es | ||
<Image source={{uri: contact.thumbnailPath}} /> | ||
@@ -211,3 +214,3 @@ ``` | ||
Usage as follows: | ||
```js | ||
```es | ||
Contacts.checkPermission((err, permission) => { | ||
@@ -214,0 +217,0 @@ if (err) throw err; |
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
168210
232