🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-native-contacts

Package Overview
Dependencies
Maintainers
3
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-contacts - npm Package Compare versions

Comparing version

to
2.2.4

2

package.json

@@ -7,3 +7,3 @@ {

},
"version": "2.2.3",
"version": "2.2.4",
"description": "React Native Contacts (android & ios)",

@@ -10,0 +10,0 @@ "nativePackage": true,

# React Native Contacts
To contribute read [CONTRIBUTING.md](CONTRIBUTING.md).
Ask questions on [stackoverflow](https://stackoverflow.com/questions/tagged/react-native-contacts) not the issue tracker.
## Usage

@@ -31,3 +33,5 @@ `getAll` is a database intensive process, and can take a long time to complete depending on the size of the contacts list. Because of this, it is recommended you access the `getAll` method before it is needed, and cache the results for future use.

## Installation
### React Native Link
To use this module you have to install it and configure the permissions. Please read this entire section.
### Automatic
with npm

@@ -46,3 +50,4 @@

### Manual installation
### Manual
#### iOS

@@ -55,13 +60,51 @@ 1. In XCode, in the project navigator, right click Libraries `Add Files to [your project's name]`

### iOS Permissions
#### Android
1. In `android/settings.gradle`
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.
```gradle
...
include ':react-native-contacts'
project(':react-native-contacts').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-contacts/android')
```
Open Xcode > Info.plist > Add a key (starting with "Privacy - ...") with your kit specific permission. The value for the key is optional in development. If you submit to the App Store the value must explain why you need this permission.
3. In `android/app/build.gradle`
You have to add the key "Privacy - Contacts Usage Description".
```gradle
...
dependencies {
...
implementation project(':react-native-contacts')
}
```
4. register module (in MainApplication.java)
```java
import com.rt2zz.reactnativecontacts.ReactNativeContacts; // <--- import
public class MainActivity extends ReactActivity {
......
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ReactNativeContacts()); // <------ add this
}
......
}
```
### Permissions
#### iOS
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.
Open Xcode > open ios/yourApp.xcodeproj > Info.plist > Add key `Privacy - Contacts Usage Description` with your kit specific permission. The value for the key is optional in development. If you submit to the App Store the value must explain why you need this permission.
<img width="338" alt="screen shot 2016-09-21 at 13 13 21" src="https://cloud.githubusercontent.com/assets/5707542/18704973/3cde3b44-7ffd-11e6-918b-63888e33f983.png">
### Android Permissions
#### Android
Android requires allowing permissions with https://facebook.github.io/react-native/docs/permissionsandroid.html

@@ -101,2 +144,7 @@ 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.

jobTitle: "",
note: 'some text',
urlAddresses: [{
label: "home",
url: "www.jung.com",
}],
middleName: "",

@@ -233,4 +281,20 @@ phoneNumbers: [{

<h2 align="center">Maintainers</h2>
<table>
<tbody>
<tr>
<td align="center">
<a href="https://github.com/morenoh149">
<img width="150" height="150" src="https://github.com/morenoh149.png?size=150">
</br>
Harry Moreno
</a>
</td>
</tr>
<tbody>
</table>
## LICENSE
[MIT License](LICENSE)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet