@contactsmanager/rn
v1.1.1
Published
Add social features into your app with a single line of code
Readme
ContactsManager React Native SDK
ContactsManager.io is a powerful contact management solution designed specifically for consumer app builders. It provides a seamless, secure, and efficient way to manage user contacts across platforms while maintaining the highest standards of privacy and security.
Add powerful contact management and social features to your React Native app with minimal code.
Purpose
I built ContactsManager after my experiences at companies like Facebook, Google, and startups where I witnessed firsthand the challenges of building truly engaging social products. My vision is to give developers the tools to create authentic social experiences while maintaining the highest standards of privacy and security.
With ContactsManager, you can build all the engaging features that platforms like Facebook, Instagram, and LinkedIn offer, but with a crucial difference: user contact data stays on their devices only. This prevents data misuse while enabling viral growth through genuine connections. Build social features into your app with just a few lines of code, all while preserving the privacy of your users and their contacts.
Key Features
| Feature | Description | Documentation | | --------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | Follow Contacts | Enable users to follow others and receive their updates | Social Features | | Activity Feeds | Build chronological feeds of user activities and interactions | Social Features | | Friend Recommendations | Discover users who might be real-world connections without sharing contact lists | Friend Recommendations | | Contact Search | Multi-field search across names, phones, emails with fuzzy matching | Contacts Search | | App User Discovery | Identify which contacts are already using your application | Friend Recommendations | | Offline Support | Full functionality even without internet connectivity | Offline Functionality | | Privacy Protection | Military-grade encryption and local processing of contact data | Privacy By Design |
View all features and documentation →
1. Installation
npm install @contactsmanager/rn
# or
yarn add @contactsmanager/rnKeeping the SDK Up-to-Date
To update to the latest version of the SDK, run:
yarn upgrade @contactsmanager/rn --latest
# or
npm update @contactsmanager/rn2. SDK Setup
- Create a free API key from contactsmanager.io
- Generate an authentication token from your backend server (see documentation for details)
- Initialize the SDK in your app with the token
import { initialize, isInitialized } from '@contactsmanager/rn';
// Check if already initialized
const alreadyInitialized = await isInitialized();
// Recommendation: Get token from your own server in production
const TOKEN = null;
// Initialize with your API key and token from server
const result = await initialize(API_KEY, userInfo, TOKEN, {});3. Platform Setup
iOS Setup
The package includes the ContactsManagerObjc.xcframework that is automatically integrated into your project.
- Install CocoaPods dependencies:
cd ios && pod install && cd ..- Add the necessary permissions to your
Info.plist:
<key>NSContactsUsageDescription</key>
<string>We need access to your contacts to enable social features</string>Android Setup
Android support is coming soon! Check our documentation for updates.
4. Basic Usage
import {
requestContactsAccess,
hasContactsReadAccess,
getContacts,
} from '@contactsmanager/rn';
// Request access to contacts
const requestAccess = async () => {
try {
// Request access - handles both full and limited access cases
const { granted } = await requestContactsAccess();
if (granted) {
// Check if we have read access (either full or limited authorization)
const hasReadAccess = await hasContactsReadAccess();
if (hasReadAccess) {
// Fetch contacts
const contacts = await getContacts();
console.log(`Retrieved ${contacts.length} contacts`);
}
}
} catch (error) {
console.error('Error accessing contacts:', error);
}
};API Reference
For complete API documentation, please visit: https://docs.contactsmanager.io/quickstart
Get a Free Demo
Interested in learning more? Get a free demo setup via: https://www.contactsmanager.io/demo
License
MIT
