Socket
Socket
Sign inDemoInstall

react-native-contacts

Package Overview
Dependencies
Maintainers
3
Versions
101
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 0.8.2 to 0.9.0

8

CONTRIBUTING.md

@@ -10,3 +10,9 @@ # Contributing

* submit a feature test on https://github.com/morenoh149/react-native-contacts-test to test it's integration
* submit a pull request on this repo
* submit a pull request on this repo, and describe:
* a brief description
* what operating systems are affected
* **detail of the expected change(s) in behaviour**
* how to test it (if it's not obvious)
Ask someone to test it (offer to test someone else's PR in exchange for testing yours). The contributors don't always have time to test so it's great when the community can help out.

@@ -13,0 +19,0 @@ Things to note:

2

package.json

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

},
"version": "0.8.2",
"version": "0.9.0",
"description": "React Native Contacts (android & ios)",

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

# React Native Contacts
To contribute read [CONTRIBUTING.md](https://github.com/rt2zz/react-native-contacts).
To contribute read [CONTRIBUTING.md](CONTRIBUTING.md).

@@ -38,10 +38,12 @@ Rx support with [react-native-contacts-rx](https://github.com/JeanLebrument/react-native-contacts-rx)

## Installation
run `npm install react-native-contacts`
### iOS
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. add `./node_modules/react-native-contacts/ios/RCTContacts.xcodeproj`
3. In the XCode project navigator, select your project, select the `Build Phases` tab and in the `Link Binary With Libraries` section add **libRCTContacts.a**
run:
#### Permissions
npm install react-native-contacts
react-native link react-native-contacts
_For versions of RN before [v0.21.0](https://github.com/facebook/react-native/releases/tag/v0.21.0) use the [old instructions](https://github.com/rt2zz/react-native-contacts/tree/1ce4b876a416bc2ca3c53e7d7e0296f7fcb7ce40#android)._
#### iOS Permissions
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.

@@ -55,46 +57,6 @@

### Android
#### Android Permissions
_For versions of RN before [v0.21.0](https://github.com/facebook/react-native/releases/tag/v0.21.0) use the [old instructions](https://github.com/rt2zz/react-native-contacts/tree/1ce4b876a416bc2ca3c53e7d7e0296f7fcb7ce40#android)._
Add permissions to your `android/app/src/main/AndroidManifest.xml` file. Add only the permissions you need (i.e. if you don't need the _WRITE_CONTACTS_ permission then there's no need to add it).
* In `android/settings.gradle`
```gradle
...
include ':react-native-contacts'
project(':react-native-contacts').projectDir = new File(settingsDir, '../node_modules/react-native-contacts/android')
```
* In `android/app/build.gradle`
```gradle
...
dependencies {
...
compile project(':react-native-contacts')
}
```
* register module (in android/app/src/main/java/com/[your-app-name]/MainApplication.java)
```java
...
import com.rt2zz.reactnativecontacts.ReactNativeContacts; // <--- import module!
public class MainApplication extends Application implements ReactApplication {
...
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ReactNativeContacts() // <--- and add package
);
}
...
}
```
* add Contacts permission (in android/app/src/main/AndroidManifest.xml)
* only add the permissions you need
* `READ_PROFILE` may be a required for other permissions
```xml

@@ -152,2 +114,3 @@ ...

}],
hasThumbnail: true,
thumbnailPath: 'content://com.android.contacts/display_photo/3',

@@ -154,0 +117,0 @@ postalAddresses:

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc