
Customer.io React Native SDK
The official Customer.io SDK for React Native enables you to integrate mobile messaging features—like in-app messaging and push notifications—into your app. These features can be triggered by events sent through the SDK and configured using your Customer.io campaigns.
📖 Full documentation: customer.io/docs/sdk/react-native
🧪 Example apps: see the /example
directory
Installation
npm install customerio-reactnative
SDK Initialization
Here’s a simplified example showing how to initialize the SDK to enable most mobile features:
import {
CustomerIO,
CioConfig,
CioLogLevel,
CioRegion,
} from 'customerio-reactnative';
useEffect(() => {
const config: CioConfig = {
cdpApiKey: 'your-cdp-api-key',
migrationSiteId: 'your-site-id',
region: CioRegion.US,
logLevel: CioLogLevel.debug,
trackApplicationLifecycleEvents: true,
inApp: {
siteId: 'your-site-id',
},
push: {
android: {
pushClickBehavior: 'ActivityPreventRestart',
},
},
};
CustomerIO.initialize(config);
}, []);
🔑 For help finding your credentials, check out the Quick Start Guide.
📲 Push Notifications
This SDK supports rich push notifications using Firebase (for Android) and either Firebase or APNs (for iOS). Follow our push setup guide to configure your project for push.
Identify Users, Track Events, and More
Customer.io helps you personalize your mobile experience:
Contributing
We welcome contributions! To get started:
License
MIT