Skip to content

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

Merged
thomson-t merged 9 commits into
mainfrom
feat/rokt-sdk-5-2-shoppable
May 14, 2026
Merged

feat(rokt): support mParticle Apple SDK 9.2#324
thomson-t merged 9 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 dependency pins (Apple SDK/Rokt + Android core), so regressions could affect Rokt initialization/behavior and Expo prebuild output. Changes are scoped and largely additive but touch cross-platform native code paths.

Overview
Aligns the iOS wrapper with the mParticle-Apple-SDK-ObjC ~> 9.2 / RoktContracts ~> 2.0 dependency update and pins the Expo-generated mParticle-Rokt Pod to ~> 9.2.

Adds new JS-facing Rokt APIs close(), setSessionId(), and getSessionId() across codegen specs and both iOS (RNMPRokt.mm) and Android (new+old arch MPRoktModule*) bridges.

Extends the Expo config plugin with an optional customBaseUrl (validated as https) and injects the corresponding native network options on iOS (MPNetworkOptions.customBaseURL) and Android (NetworkOptions.setCustomBaseURL) before SDK start.

Updates the Expo test app, sample app, and docs/migration guide to reflect the new Rokt APIs, updated kit/core version requirements (Android android-core floor 5.79.0), and the intentional omission of payment extensions / URL callback forwarding.

Reviewed by Cursor Bugbot for commit 2d14531. 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
Add a shared Expo customBaseUrl option for CNAME setup so iOS and Android use the same configuration value during mParticle startup.

Update Android integration requirements to 5.79.0 and align the sample and documentation with the new shared setting.

#agentic
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2d14531. Configure here.

Comment thread plugin/src/withMParticleIOS.ts
@thomson-t thomson-t merged commit 98f1bbc into main May 14, 2026
11 checks passed
@thomson-t thomson-t deleted the feat/rokt-sdk-5-2-shoppable branch May 14, 2026 19:08
@rokt-releases rokt-releases Bot mentioned this pull request May 14, 2026
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.

4 participants