Skip to content

React Native custom module to get contact list with Kotlin (Android) and Swift (iOS)

License

Notifications You must be signed in to change notification settings

arevalu/rn-contacts

Repository files navigation

rn-contacts

React Native custom module to get contact list with Kotlin (Android) and Swift (iOS)

📱 Screenshots

iOS Android
Simulator Screen Shot - iPhone 13 - 2022-07-24 at 11 41 38 Screenshot_1658596729

🚀 Installation

npm install rn-contacts

🤓 Usage

import { getAllContacts } from "rn-contacts";

// ...

const fetchContacts = async () => {
  try {
    const result = await getAllContacts();
  } catch(e) {
    console.log(e);
  }
}

You can also check the 👉 example 👈 implementation

✅ Permissions

iOS

Add kit specific "permission" keys to your Xcode Info.plist file, in order to make requestPermission work. Otherwise your app crashes when requesting the specific permission.

  • Open Info.plist.
  • Add key Privacy - Contacts Usage Description with your kit specific permission.
    • The value for the key is optional in development. If you submit to the App Store the value must explain why you need this permission.

Android - API 23+

Android requires allowing permissions with the READ_CONTACTS permission must be added to your main application's AndroidManifest.xml.

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

🗒 TO DO

  • iOS module (Swift)
  • Android module (Kotlin)
  • Example with Typescript

🤝 Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

📃 License

MIT

About

React Native custom module to get contact list with Kotlin (Android) and Swift (iOS)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published