Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 1.95 KB

File metadata and controls

70 lines (50 loc) · 1.95 KB

Migration Guides

This document provides migration guidance for changes in react-native-mparticle. Release versions and changelog entries are generated by the Release Draft workflow.

Migrating to the mParticle Apple SDK 9.2.0 Rokt update

This update aligns the React Native wrapper with mParticle-Apple-SDK and mParticle-Rokt 9.2.0. The Apple Rokt kit now resolves Rokt-Widget ~> 5.2 and RoktContracts ~> 2.0.

Dependency Changes

For standard Rokt placements on iOS, use:

pod 'mParticle-Rokt', '~> 9.2'

Do not add Rokt-Widget directly to this React Native wrapper's podspec. Apps receive it transitively through mParticle-Rokt.

React Native Rokt API

The wrapper exposes these Rokt APIs to JavaScript:

MParticle.Rokt.close(): Promise<void>
MParticle.Rokt.setSessionId(sessionId: string): Promise<void>
MParticle.Rokt.getSessionId(): Promise<string | null>

close() is supported on iOS and Android. Session APIs are backed by the iOS mParticle Rokt kit. On Android, apps that use these session APIs must use android-core and android-rokt-kit 5.79.0 or newer.

Expo Config Plugin

Use iosKits: ["mParticle-Rokt"] for standard Rokt placements:

[
  "react-native-mparticle",
  {
    "iosApiKey": "YOUR_IOS_API_KEY",
    "iosApiSecret": "YOUR_IOS_API_SECRET",
    "iosKits": ["mParticle-Rokt"]
  }
]

The plugin pins generated mParticle-Rokt pods to ~> 9.2. It does not add payment-extension pods or URL callback forwarding in this release.

For global CNAME setup, configure the shared customBaseUrl setting:

{
  "customBaseUrl": "https://cname.example.com"
}

The plugin applies this through MPNetworkOptions.customBaseURL on iOS and NetworkOptions.setCustomBaseURL on Android before mParticle starts. There is no runtime JavaScript setter because the Rokt kit reads this setting during initialization.

Notes

  • The React Native API intentionally does not expose handleURLCallback.