Unified React Native Plugin
The unified React Native plugin works with Marketing Cloud Engagement and Marketing Cloud Next, giving you a single, consistent way to integrate either product with React Native.
If you use the Marketing Cloud Engagement-specific version of the React Native plugin, you can migrate to the unified React Native plugin. See Migrate to React Native Unified Plugin.
Use this setup if:
- You’re integrating React Native for the first time.
- You use Marketing Cloud Engagement, but you don’t already use the Engagement-specific React Native module.
- You’re implementing Mobile App Messaging with React Native.
Make sure these components meet the baseline requirements.
| Components | Minimum Requirement |
|---|---|
| React Native | 0.85.1 or later (with New Architecture enabled) |
| React | 19.0 or later (tested against 19.2.3) |
| Node.js | 20 or later |
| iOS | 15.1 or later (Xcode 16 or later) |
| Android | minSdk 26, compileSdk 36 or later |
| Ruby (CocoaPods) | 3.1.0 or later |
The React Native unified plugins run only on React Native New Architecture (TurboModules) and don’t support the bridge architecture. Make sure you enable the new architecture app-wide before adopting these plugins. For more information, see React Native Architecture: About the New Architecture.
Integrating Marketing Cloud features into a React Native app required stitching together separate SDKs and bridge modules per feature. This React Native unified plugin consolidates Push, In-App Messaging, Marketing Cloud Engagement, and Mobile App Messaging in one consistent requestSdk() API. This way, you pick the product you need and additionally add the features that you actually use.
The React Native unified plugin offers these packages:
- Product packages: Represent a Marketing Cloud product. Depending on app usage, install either or both
@sfmc/react-native-marketingcloudsdk(Marketing Cloud Engagement) and@sfmc/react-native-mobileappmessaging(Mobile App Messaging). - Core package: (
@sfmc/react-native-sfmc-core) is the core foundational dependency that both product packages depend on. When you install a product package, the system installs this core package automatically. - Feature packages: (
@sfmc/react-native-pushand@sfmc/react-native-iam) are optional add-ons. Install only the feature that your app needs.
| Package | Type | Description |
|---|---|---|
@sfmc/react-native-sfmc-core | Core | Core module for identity management, custom attributes, structured event tracking, and SDK logging. |
@sfmc/react-native-marketingcloudsdk | Product | Product module for Marketing Cloud Engagement including inbox, tags, attributes, analytics, and registration management. |
@sfmc/react-native-mobileappmessaging | Product | Product module for Marketing Cloud Mobile App Messaging including analytics and registration management. |
@sfmc/react-native-push | Feature | Module for push registration and push notification. |
@sfmc/react-native-iam | Feature | Module for in-app messaging SDK readiness and programmatic in-app message display. |
@sfmc/react-native-iam (In-App Messaging) and @sfmc/react-native-mobileappmessaging (Mobile App Messaging) packages are not the same and are not interchangeable. In-App Messaging delivers messages inside your running app. Whereas, Mobile App Messaging is a Marketing Cloud product for device registration and analytics.
- The unified plugins require React Native 0.85.1 with the New Architecture (TurboModules). The plugins don’t support the bridge architecture.
- TurboModule specs are codegen-driven. Each package defines a
Native<Name>Module.tsspecification, and React Native codegen generates the Java and Objective-C++ bindings. - Native Package Identifiers: The plugin’s native code is located under
com.salesforce.mc.{sfmccore, push, iam, marketingcloudsdk, mobileappmessaging}on Android, with equivalent module prefixes on iOS. Use these identifiers when you set up ProGuard/R8 keep rules or diagnose native stack traces.
- Install and Configure the Unified React Native Plugin
- Configure React Native for Android
- Configure React Native for iOS
- Migrate to React Native Unified Plugin (Required only if you’re migrating from the Marketing Cloud Engagement-specific version of the React Native
react-native-marketingcloudsdkplugin.)