feat(rokt): support mParticle Apple SDK 9.2#324
Conversation
Update the React Native wrapper for the published mParticle Apple SDK and Rokt kit 9.2.0 release. This pins the iOS dependency range, adds the new Rokt close and session APIs, and keeps URL callback handling in native iOS lifecycle code instead of exposing a React Native API. The Expo plugin now supports iOS custom base URLs before startup and injects native Rokt URL forwarding for standard generated AppDelegate handlers. The sample apps and documentation cover the migration, Shoppable Ads setup, and platform behavior.
PR SummaryMedium Risk Overview Extends the React Native Rokt surface area by adding promise-based Enhances the Expo config plugin with Reviewed by Cursor Bugbot for commit a21ca54. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Pull request overview
This PR updates the React Native mParticle wrapper to align with the mParticle Apple SDK + Rokt kit 9.2.0, including new Rokt APIs and Expo config plugin support for iOS CNAME/base URL and native URL callback forwarding.
Changes:
- Pinned iOS dependencies to
mParticle-Apple-SDK-ObjC ~> 9.2andRoktContracts ~> 2.0, plus updated sample Podfile pinning formParticle-Rokt ~> 9.2. - Added Rokt
close,setSessionId, andgetSessionIdacross JS/codegen + iOS/Android bridges, and surfaced them in sample apps. - Enhanced the Expo config plugin to support
iosCustomBaseURL, kit pod version pinning, and native AppDelegate URL forwarding for Rokt callback handling.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sample/README.md | Documents pinned Rokt pods and native URL callback handling expectations for iOS. |
| sample/ios/Podfile | Pins mParticle-Rokt to ~> 9.2 for the sample app. |
| sample/index.js | Updates sample UI/logic and adds buttons for new Rokt close/session APIs. |
| sample/mocks/react-native-mparticle.js | Extends Jest mock to include new Rokt methods and formatting tweaks. |
| README.md | Adds iosCustomBaseURL docs and Rokt iOS setup / URL forwarding guidance. |
| react-native-mparticle.podspec | Pins wrapper iOS dependencies to Apple SDK ~> 9.2 and RoktContracts ~> 2.0. |
| plugin/src/withMParticleIOS.ts | Adds iosCustomBaseURL, pins certain kit pods, and injects Rokt URL callback forwarding into AppDelegate. |
| plugin/src/withMParticle.ts | Adds iosCustomBaseURL to Expo plugin props interface. |
| MIGRATING.md | New migration guide for the Apple SDK/Rokt 9.2 update and behavior notes. |
| js/rokt/rokt.ts | Adds JS-facing close, setSessionId, getSessionId APIs. |
| js/codegenSpecs/rokt/NativeMPRokt.ts | Extends TurboModule spec with new promise APIs. |
| js/codegenSpecs/NativeMParticle.ts | Minor signature formatting change. |
| ios/RNMParticle/RNMPRokt.mm | Implements new Rokt methods in the iOS native module (old + new arch). |
| ExpoTestApp/README.md | Updates Expo test app docs for payment extension + URL callback + new APIs. |
| ExpoTestApp/App.tsx | Adds UI handlers to call close() and session APIs. |
| ExpoTestApp/app.json | Adds plugin config for iosCustomBaseURL and build properties. |
| android/src/oldarch/java/com/mparticle/react/rokt/MPRoktModule.kt | Exposes new Rokt methods to RN old architecture bridge. |
| android/src/oldarch/java/com/mparticle/react/NativeMPRoktSpec.kt | Updates old-arch spec to include new methods. |
| android/src/newarch/java/com/mparticle/react/rokt/MPRoktModule.kt | Exposes new Rokt methods to RN new architecture bridge. |
| android/src/main/java/com/mparticle/react/rokt/MPRoktModuleImpl.kt | Implements close() and stubs session APIs with warnings on Android. |
| .trunk/trunk.yaml | Adjusts pinned ESLint version used by Trunk. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Update the React Native wrapper for the published mParticle Apple SDK and Rokt kit 9.2.0 release.
mParticle-Apple-SDK-ObjC ~> 9.2andRoktContracts ~> 2.0.close,setSessionId, andgetSessionIdAPIs to JS, codegen, iOS, and Android bridge layers.handleURLCallbackout of the React Native API surface.iosCustomBaseURLand generatedmParticle-Rokt ~> 9.2pods.MIGRATING.mdfor the 9.2.0 Rokt update.Testing Plan
yarn buildyarn build:pluginyarn testcd android && ./gradlew lintcd android && ./gradlew test lint ktlintCheckyarn dev:packcd sample/android && ./gradlew assembleDebugcd ExpoTestApp && npm run prebuildcd sample/ios && xcodebuild -workspace MParticleSample.xcworkspace -scheme MParticleSample -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,id=DD9D624A-B138-45EB-8F87-0D53288F97C6' buildtrunk check --ciConfirmed CocoaPods resolved
mParticle-Rokt 9.2.0,Rokt-Widget 5.2.1, andRoktContracts 2.0.1in the sample and Expo prebuild outputs. Also verified Expo prebuild does not generate Rokt URL callback forwarding or payment-extension pods.