You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iOS New Architecture: logCommerceEvent now maps productActionType through [RCTConvert MPCommerceEventAction:] (same as the legacy bridge) instead of casting to MPCommerceEventAction, fixing scrambled product commerce actions.
Promotions: promotionActionType is mapped with [RCTConvert MPPromotionAction:] because JS order (View=0, Click=1) does not match MPPromotionAction (Click=0, View=1). Applied in New Arch logCommerceEvent and in [RCTConvert MPPromotionContainer:].
Legacy helper: RCTConvert (MParticle) MPCommerceEvent: now uses MPCommerceEventAction: for productActionType instead of a raw cast.CI / tests: PR workflow runs focused XCTests in the sample app (RCTConvertCommerceMappingTests) covering enum mapping and JSON → MPCommerceEvent / MPPromotionContainer. Sample README documents how to run them locally.
Testing Plan
Automated: xcodebuild test in CI (sample workspace) with -only-testing:MParticleSampleTests/RCTConvertCommerceMappingTests after pod install.
Manual (recommended once): On an iOS New Arch build, log a product-action commerce event and a promotion commerce event and confirm actions match JS constants in verbose / payload output.
Note: XCTests exercise RCTConvert and the JSON MPCommerceEvent assembly path; they do not drive the TurboModule JSI struct entry point directly.
Low Risk
Changes are limited to sample tests, CI, and docs; no production SDK or app runtime code in this diff.
Overview
Adds RCTConvertCommerceMappingTests to the sample iOS test target to lock in JS ProductActionType / PromotionActionType integers → Apple SDK enums and JSON → +[RCTConvert MPCommerceEvent:] (including promotion container wiring). The tests intentionally cover the legacy RCTConvert assembly path, not the TurboModule codegen entry point.
The iOS Sample App PR workflow step switches from xcodebuild build-only to test scoped to that suite (-only-testing:MParticleSampleTests/RCTConvertCommerceMappingTests), with a comment reminding maintainers to keep the job display name aligned with branch protection. sample/README.md documents how to run the same tests locally.
Reviewed by Cursor Bugbot for commit a44077d. Bugbot is set up for automated code reviews on this repo. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing Plan
Master Issue
Closes https://go.mparticle.com/work/REPLACEME