Access the device address book natively to pick contact details, phone numbers, and emails for invite/referral flows.
Access the native device address book to select contacts for invites and referrals. Nativine embeds native iOS CNContactPickerViewController and Android ContactsContract picker viewports, allowing users to choose contacts safely with privacy protection.
Referral programs and friend invites convert faster when users can pick contacts directly. Nativine's Native Contacts plugin presents OS-native contact selection sheets:
To present the native contact picker sheet from JavaScript, call nativine.contacts.selectContact():
nativine.contacts.selectContact({
fields: ['givenName', 'familyName', 'phoneNumbers', 'emailAddresses'],
callback: 'onContactSelected',
onCancel: 'onContactPickerCancelled'
});
function onContactSelected(contact) {
console.log("Selected Name:", contact.givenName, contact.familyName);
console.log("Selected Phone:", contact.phoneNumbers[0]);
console.log("Selected Email:", contact.emailAddresses[0]);
}
| Parameter | Type | Description |
|---|---|---|
fields | array | Optional. Array of contact property keys requested (e.g. phoneNumbers, emailAddresses). |
callback | string | Required. JS callback receiving selected contact details. |
No. The native picker UI isolated process returns only the specific contact tapped by the user, protecting privacy.
Yes. Pass allowMultiple: true to enable multi-selection checkboxes in the contact picker sheet.