Overview
The react-native-contacts-wrapper is a simple wrapper for the native iOS and Android Contact Picker UIs. It provides a way to interact with the ContactsContract API for Android and AddressBook library for iOS8 and below, as well as the new Contacts library for iOS9 and above. The API currently focuses on selecting a contact’s email address but provides basic functionality to return contact data.
Features
- Simple Wrapper: Provides a straightforward interface to launch native contact pickers on iOS and Android.
- Basic Functionality: Current version offers data retrieval for a contact’s name, phone number, and email.
- Extendable: The library welcomes extensions and pull requests for adding more fields and specific methods.
Installation
Automatic (works for iOS without condition; for Android with RN 0.28 and before)
If you have rnpm installed, follow these steps.
Manual Installation
Android (with RN 0.29 and above)
- Add configurations in
settings.gradle,android/app/build.gradle,MainApplication.java, andAndroidManifest.xml.
iOS
- Perform steps in Xcode to link frameworks and libraries.
- Clean and rebuild the Xcode project.
Summary
The react-native-contacts-wrapper is a convenient tool for integrating native contact pickers in iOS and Android applications. It simplifies the process of selecting contacts and retrieving basic information such as name, phone number, and email. With a focus on simplicity and extensibility, this wrapper provides an accessible way to work with native contact APIs.