Skip to content

feat(rokt): support mParticle Apple SDK 9.2#324

Open
thomson-t wants to merge 8 commits into
mainfrom
feat/rokt-sdk-5-2-shoppable
Open

feat(rokt): support mParticle Apple SDK 9.2#324
thomson-t wants to merge 8 commits into
mainfrom
feat/rokt-sdk-5-2-shoppable

Conversation

@thomson-t
Copy link
Copy Markdown
Contributor

@thomson-t thomson-t commented May 13, 2026

Summary

Update the React Native wrapper for the published mParticle Apple SDK and Rokt kit 9.2.0 release.

  • Pin the wrapper iOS dependencies to mParticle-Apple-SDK-ObjC ~> 9.2 and RoktContracts ~> 2.0.
  • Add Rokt close, setSessionId, and getSessionId APIs to JS, codegen, iOS, and Android bridge layers.
  • Keep handleURLCallback out of the React Native API surface.
  • Add Expo plugin support for iosCustomBaseURL and generated mParticle-Rokt ~> 9.2 pods.
  • Do not add Expo plugin support for payment-extension pods or native URL callback forwarding in this release.
  • Update the sample apps and docs, including a new MIGRATING.md for the 9.2.0 Rokt update.
  • Leave package version and changelog updates to the Release Draft workflow.

Testing Plan

  • yarn build
  • yarn build:plugin
  • yarn test
  • cd android && ./gradlew lint
  • cd android && ./gradlew test lint ktlintCheck
  • yarn dev:pack
  • cd sample/android && ./gradlew assembleDebug
  • cd ExpoTestApp && npm run prebuild
  • cd sample/ios && xcodebuild -workspace MParticleSample.xcworkspace -scheme MParticleSample -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,id=DD9D624A-B138-45EB-8F87-0D53288F97C6' build
  • trunk check --ci

Confirmed CocoaPods resolved mParticle-Rokt 9.2.0, Rokt-Widget 5.2.1, and RoktContracts 2.0.1 in the sample and Expo prebuild outputs. Also verified Expo prebuild does not generate Rokt URL callback forwarding or payment-extension pods.

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.
Copilot AI review requested due to automatic review settings May 13, 2026 21:00
@thomson-t thomson-t requested a review from a team as a code owner May 13, 2026 21:00
@cursor
Copy link
Copy Markdown

cursor Bot commented May 13, 2026

PR Summary

Medium Risk
Updates native iOS/Android bridge surfaces and CocoaPods dependency pins for the Rokt integration; regressions could impact app startup/builds or Rokt placement/session behavior across architectures.

Overview
Aligns iOS dependencies with the published mParticle Apple SDK/Rokt kit 9.2.x by bumping the wrapper podspec (mParticle-Apple-SDK-ObjC ~> 9.2, RoktContracts ~> 2.0) and updating docs/migration guidance.

Extends the React Native Rokt surface area by adding promise-based MParticle.Rokt.close(), setSessionId(), and getSessionId() end-to-end (JS codegen + JS wrapper + iOS RNMPRokt + Android old/new arch modules).

Enhances the Expo config plugin with iosCustomBaseURL validation and injection of MPNetworkOptions.customBaseURL before SDK start, and pins generated mParticle-Rokt Podfile entries to ~> 9.2 (including dynamic-link preinstall updates for new transitive pods). Sample/Expo test apps and lint tooling were updated accordingly.

Reviewed by Cursor Bugbot for commit a21ca54. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.2 and RoktContracts ~> 2.0, plus updated sample Podfile pinning for mParticle-Rokt ~> 9.2.
  • Added Rokt close, setSessionId, and getSessionId across 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.

Comment thread plugin/src/withMParticleIOS.ts Outdated
Comment thread ios/RNMParticle/RNMPRokt.mm
Comment thread sample/index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants