Migrate Campaign SDK for React Native from 3.0.1 to 3.8.0/3.8.4

To migrate Campaign SDK for Reach Native 3.0.1 to version 3.8.0 or 3.8.4, do the following:

  1. Remove the existing SDK plug-ins that are currently installed. If one of these is not currently installed, you don’t need to execute the command to remove it.
npm install

npx react-native unlink react-native-acoustic-mobile-push
npx react-native unlink react-native-acoustic-mobile-push-beacon
npx react-native unlink react-native-acoustic-mobile-push-calendar
npx react-native unlink react-native-acoustic-mobile-push-displayweb
npx react-native unlink react-native-acoustic-mobile-push-geofence
npx react-native unlink react-native-acoustic-mobile-push-inapp
npx react-native unlink react-native-acoustic-mobile-push-inbox
npx react-native unlink react-native-acoustic-mobile-push-location
npx react-native unlink react-native-acoustic-mobile-push-snooze

npm uninstall react-native-acoustic-mobile-push
npm uninstall react-native-acoustic-mobile-push-beacon
npm uninstall react-native-acoustic-mobile-push-calendar
npm uninstall react-native-acoustic-mobile-push-displayweb
npm uninstall react-native-acoustic-mobile-push-geofence
npm uninstall react-native-acoustic-mobile-push-inapp
npm uninstall react-native-acoustic-mobile-push-inbox
npm uninstall react-native-acoustic-mobile-push-location
npm uninstall react-native-acoustic-mobile-push-snooze
  1. Modify AndroidManifest.xml. Remove all nodes of the type <service>, <receiver>, <provider> with the android:name starting with com.ibm.mce.sdk or co.acoustic.mobile.push.
  2. Install the 3.8.0/3.8.4 new SDK plug-ins, replacing <path to download> with the location of the 3.8.0/3.8.4 SDK download. You only need to reinstall the plug-ins you previously used.
npm install <path to download>/plugins/react-native-acoustic-mobile-push
npm install <path to download>/plugins/react-native-acoustic-mobile-push-beacon
npm install <path to download>/plugins/react-native-acoustic-mobile-push-calendar
npm install <path to download>/plugins/react-native-acoustic-mobile-push-displayweb
npm install <path to download>/plugins/react-native-acoustic-mobile-push-geofence
npm install <path to download>/plugins/react-native-acoustic-mobile-push-inapp
npm install <path to download>/plugins/react-native-acoustic-mobile-push-inbox
npm install <path to download>/plugins/react-native-acoustic-mobile-push-location
npm install <path to download>/plugins/react-native-acoustic-mobile-push-snooze

npx react-native link react-native-acoustic-mobile-push
npx react-native link react-native-acoustic-mobile-push-beacon
npx react-native link react-native-acoustic-mobile-push-calendar
npx react-native link react-native-acoustic-mobile-push-displayweb
npx react-native link react-native-acoustic-mobile-push-geofence
npx react-native link react-native-acoustic-mobile-push-inapp
npx react-native link react-native-acoustic-mobile-push-inbox
npx react-native link react-native-acoustic-mobile-push-location
npx react-native link react-native-acoustic-mobile-push-snooze

iOS project changes

  1. Open the project in Xcode, select the project’s General tab and drag the AcousticMobilePush.framework into the Frameworks, libraries, and embedded content section. Verify that Embed and sign is selected in the dropdown.
  2. Select the Build settings tab.
  3. Search for Framework Search Paths, double click on setting value, and drag in enclosing folder of the AcousticMobilePush.framework.

Android project changes

  1. Open the project in Android Studio.
  2. If applicable, invalidate caches and restart Android Studio.
  3. You may also need to adjust the MainApplication.java file due to bugs in React Native’s unlink implementation.

📘

Note:

React Native does not yet support dark mode. There are multiple plug-ins that aim to fill that void and the main project also intends to provide support in the future. However, none of these options are ready today.