Install and configure

Install and configure the React Native unified plugin for your app.

Install a Product Package 

Install the product package that matches your implementation.

To install Marketing Cloud Engagement, use @sfmc/react-native-marketingcloudsdk:

npm
1npm install @sfmc/react-native-marketingcloudsdk
Yarn
1yarn add @sfmc/react-native-marketingcloudsdk

To install Mobile App Messaging, use @sfmc/react-native-mobileappmessaging:

npm (Mobile App Messaging)
1npm install @sfmc/react-native-mobileappmessaging
Yarn (Mobile App Messaging)
1yarn add @sfmc/react-native-mobileappmessaging

Add Optional Feature Packages 

Both marketingcloudsdk and mobileappmessaging depend on sfmc-core. When you install one of these packages, the system installs sfmc-core automatically. Install optional feature packages only when your app requires them.

Example to Install In-app Messaging Feature
1yarn add @sfmc/react-native-push @sfmc/react-native-iam

Initialize SDK Access in React Native 

Use each module’s requestSdk() API to access typed SDK operations.

Example
1import { SFMCSdkModule } from '@sfmc/react-native-sfmc-core';
2
3const coreSdk = await SFMCSdkModule.requestSdk();

Platform Configuration 

After base installation, complete platform setup: