Skip to main content

Pick & Fetch Contacts

Pick & Fetch Contacts

Use this component to fetch or pick contacts from the device filesystem.

To get started using it, you must use KmpContacts. All functions are thread safe and main thread safe.

Below are the functions available:


_7
KmpContacts.getAllContacts{
_7
val contacts = it // returns the list of all contacts from the file system
_7
}
_7
_7
KmpContacts.pickContact{
_7
val contactPicked = it //returns the contact that has been picked
_7
}

Android Setup

On android please add the following into your manifest file


_1
<uses-permission android:name="android.permission.READ_CONTACTS" />

iOS Setup

Add the following into your device's info.plist file:


_2
<key>NSContactsUsageDescription</key>
_2
<string>Reason for why your app needs access to the contacts</string>