If your package.json contains the unscoped react-native-marketingcloudsdk dependency, your app uses the Engagement-specific React Native plugin. If you’re already on the Engagement-specific React Native plugin, use this section to update your configuration or troubleshoot issues.
Before you install the React Native plugin in your app, upgrade the native MarketingCloudSdk to the latest supported version. If you use MarketingCloudSdk version 7, first upgrade to version 8, and then upgrade to version 9 or later. This sequence upgrade through version 8 preserve in-place migrations, such as schema and preference upgrades. You can upgrade to a specific plugin version by using npm or Yarn.
The Engagement-specific React Native plugin has these baseline requirements:
Component
Minimum Requirement
Recommendation
React Native
0.60 or later
For React Native 0.85.1 or later with the new architecture, use the React Native unified plugin.
iOS
See SDK for iOS release notes
Match the deployment target supported by the version of the SDK that you use.
Android
See SDK for Android release notes
Match the minSdk or compileSdk supported by the version of the SDK that you use.
Installation
Import the SDK modules into your application.
For iOS apps, import both SFMCSDK and MarketingCloudSDK into AppDelegate.
For Android apps, import SFMCSdk into MainApplication.java.
Add the React Native plugin to your application using npm or Yarn.
Use this command to install the plugin by using npm: