docs: correct README iOS setup and JS API for 3.x - #381
Conversation
PR SummaryLow Risk Overview Installation & native setup now documents iOS 15.6, expanded CocoaPods Usage samples are rewritten to match real APIs: Reviewed by Cursor Bugbot for commit f014ba6. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟡 Changes recommended
One updated README statement about Rokt promise settlement semantics is inaccurate relative to the current native implementations.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the project README to reflect the current (3.x) React Native mParticle implementation, with refreshed iOS/Expo setup guidance and corrected JavaScript API examples (including Rokt).
Changes:
- Refresh iOS/Expo installation steps (deployment target, Podfile
pre_install, updated imports, and RN 0.76+ Fabric dependency provider note). - Fix and modernize SDK start/AppDelegate snippets (Swift + Objective-C) and several JS usage examples (Identity/User, attribution/kit APIs, opt-out, consent).
- Add/expand documentation for Rokt usage and Android dependency expectations (e.g.,
android-rokt-kitas an app dependency).
File summaries
| File | Description |
|---|---|
| README.md | Updates setup and usage documentation to match the current 3.x native + JS APIs, including new Rokt coverage and corrected code samples. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
d2e1605 to
f014ba6
Compare
Summary
The README's setup instructions still described Apple SDK 8 and pre-0.76 React Native, and several
Usage samples could not run as written. Verified the whole file against the 3.x implementation and
fixed what didn't match.
pre_installlist,mParticle_Apple_SDK_ObjCimport (theNoLocationvariant is gone in 9.x), the iOS 15.6 deployment target, the RN 0.76+ Fabric dependency provider,
and removal of the Flipper step React Native no longer has.
onAttributionCompletewas written as a call rather thana block assignment; the Swift sample used pre-Swift-4 naming,
MPIdentityApiRequest()and anObjective-C
NSLog.MParticle.User.*receiver and arity,Identity.getUserIdentities,addCCPAConsentState, and the callback-basedgetAttributions/isKitActive/getOptOut— the opt-out sample always opted users out.selectPlacements,RoktLayoutView,RoktEventManager), deviceconsent, session/upload,
TransactionAttributes, and Android'scompileOnlyRokt kit.react-native >= 0.76.0peer dependency.Reviewer question: should
logPushRegistrationbe retyped to acceptnullfor iOS, or isdocumenting "pass an empty string" the right call?
Testing Plan
Docs only, no code changes. Claims and samples were checked against
js/,ios/,android/,plugin/,sample/andExpoTestApp/, plus the mParticle Apple SDK 9 headers and its own Swiftexample.
trunk check --upstream=mainreports no new issues on README.md;prettier --writealsonormalized the pre-existing plugin-options table padding.