Native Plugins & Integrations1 min read
Native Contacts Plugin
Let users pick a contact from their phone to fill forms or invite friends, with the Native Contacts plugin: fields, permissions and store review tips.
Overview
The Native Contacts plugin lets users pick a contact from their phone, for example to fill a form or invite a friend. Turn it on in Integrations › Native plugins and build a new version.
Pick a contact
javascript
const result = await wapp.contacts.pickContact();
if (result.success) {
const [contact] = result.contacts;
form.name.value = contact.displayName || '';
form.phone.value = contact.phoneNumbers?.[0]?.phoneNumber || '';
form.email.value = contact.emailAddresses?.[0]?.emailAddress || '';
}Picking several contacts at once (multiple: true) is not supported yet and answers UNSUPPORTED_OPTION.
Contact fields
Missing fields are left out:
givenName,middleName,familyName,nickname,displayNameorganizationName,departmentName,jobTitlebirthday { year?, month, day }phoneNumbers [{ label, phoneNumber }]emailAddresses [{ label, emailAddress }]postalAddresses [{ label, street, city, region, postalCode, country, isoCountryCode }]urlAddresses [{ label, url }]
Other methods
wapp.contacts.getPermissionStatus()returns{ status: 'granted' | 'denied' | 'blocked', access: 'all' | 'limited' | 'none' }. On iPhone, users can share only some contacts (limited).wapp.contacts.getAll({ limit, offset })returns every contact. It works only when Allow reading the whole address book is on in the plugin settings.
Prefer the picker
With pickContact() the user chooses exactly what to share. That means fewer permission prompts and smoother store reviews. If you use getAll, Apple and Google review it closely: explain why you need it in your store listing and privacy policy.