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.1 to 0.8.2

2

package.json

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

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

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

@@ -15,5 +15,20 @@ # React Native Contacts

Contacts.getAll((err, contacts) => {
if(err && err.type === 'permissionDenied'){
if(err === 'denied'){
// error
} else {
// contacts returned in []
}
})
```
`getContactMatchingString` is meant to alleviate the amount of time it takes to get all contacts, by filtering on the native side based on a string.
```js
var Contacts = require('react-native-contacts')
Contacts.getContactsMatchingString("filter", (err, contacts) => {
if(err === 'denied'){
// x.x
} else {
// Contains only contacts matching "filter"
console.log(contacts)

@@ -23,3 +38,2 @@ }

```
## Installation

@@ -36,3 +50,3 @@ run `npm install react-native-contacts`

Open Xcode > Info.plist > Add a key (starting with "Privacy - ...") with your kit specific permission. The value for the key is optional.
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.

@@ -71,3 +85,3 @@ You have to add the key "Privacy - Contacts Usage Description".

...
@Override

@@ -106,2 +120,3 @@ protected List<ReactPackage> getPackages() {

| `deleteContact` | ✔ | 😞 |
| `getContactsMatchingString` | ✔ | ✔ |
| get with options | 😞 | 😞 |

@@ -119,2 +134,3 @@ | groups | 😞 | 😞 |

* `deleteContact` (contact, callback) - where contact is an object with a valid recordID
* `getContactsMatchingString` (string, callback) - where string is any string to match a name (first, middle, family) to
* `checkPermission` (callback) - checks permission to access Contacts

@@ -141,4 +157,4 @@ * `requestPermission` (callback) - request permission to access Contacts

thumbnailPath: 'content://com.android.contacts/display_photo/3',
postalAddresses:
[
postalAddresses:
[
{

@@ -150,3 +166,3 @@ postCode: 'Postcooode',

formattedAddress: 'Home Street\nneighborhood\nCity Postcooode',
label: 'work'
label: 'work'
}

@@ -153,0 +169,0 @@ ]

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

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