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
npm install customerio-reactnative
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', // Required
migrationSiteId: 'your-site-id', // Optional, for migrating from older SDKs
region: CioRegion.US, // Or CioRegion.EU
logLevel: CioLogLevel.debug,
trackApplicationLifecycleEvents: true,
inApp: {
siteId: 'your-site-id', // Required for in-app messaging
},
push: {
android: {
pushClickBehavior: 'ActivityPreventRestart', // Optional
},
},
};
CustomerIO.initialize(config);
}, []);
🔑 For help finding your credentials, check out the Quick Start Guide.
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.
Customer.io helps you personalize your mobile experience:
- 👤 Identify users to associate events and devices with profiles
- 📊 Track events to trigger messaging based on user behavior
- 💬 In-App Messages are server-driven and blend seamlessly with your app
We welcome contributions! To get started:
- Review our example app to help with local development.
- Follow our Code of Conduct.