🚀 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
5.2.1

1

index.d.ts

@@ -9,2 +9,3 @@ export function getAll(callback: (error: any, contacts: Contact[]) => void): void;

export function openExistingContact(contact: Contact, callback: (error: any, contact: Contact) => void): void;
export function editExistingContact(contact: Contact, callback: (error: any, contact: Contact) => void): void;
export function updateContact(contact: Contact, callback: (error?: any) => void): void;

@@ -11,0 +12,0 @@ export function deleteContact(contact: Contact, callback: (error?: any) => void): void;

2

package.json

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

},
"version": "5.2.0",
"version": "5.2.1",
"description": "React Native Contacts (android & ios)",

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

@@ -178,4 +178,5 @@ ![react-native-contacts](https://github.com/rt2zz/react-native-contacts/raw/master/example/logo.png)

* `addContact` (contact, callback) - adds a contact to the AddressBook.
* `openContactForm` (contact, callback) - create a new contact and display in contactsUI.
* `openContactForm` (contact, callback) - create a new contact and display in contactsUI.
* `openExistingContact` (contact, callback) - where contact is an object with a valid recordID
* `editExistingContact` (contact, callback) - add numbers to the contact, where the contact is an object with a valid recordID and an array of phoneNumbers
* `updateContact` (contact, callback) - where contact is an object with a valid recordID

@@ -300,2 +301,23 @@ * `deleteContact` (contact, callback) - where contact is an object with a valid recordID

## Add numbers to an existing contact
Example
```js
var newPerson = {
recordID: '6b2237ee0df85980',
phoneNumbers: [{
label: 'mobile',
number: '(555) 555-5555',
}, ...
]
}
Contacts.editExistingContact(newPerson, (err, contact) => {
if (err) throw err;
//contact updated
});
```
Add one or more phone numbers to an existing contact.
On Android the edited page will be opened.
On iOS the already edited contact will be opened with the possibility of further modification.
### Bugs

@@ -302,0 +324,0 @@ There are issues with updating contacts on Android:

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet