Skip to content

docs: correct README iOS setup and JS API for 3.x - #381

Open
jamesnrokt wants to merge 1 commit into
mainfrom
docs/readme-verify-3x
Open

docs: correct README iOS setup and JS API for 3.x#381
jamesnrokt wants to merge 1 commit into
mainfrom
docs/readme-verify-3x

Conversation

@jamesnrokt

Copy link
Copy Markdown
Contributor

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.

  • iOS setup: split-SDK pre_install list, mParticle_Apple_SDK_ObjC import (the NoLocation
    variant 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.
  • AppDelegate samples: the Objective-C onAttributionComplete was written as a call rather than
    a block assignment; the Swift sample used pre-Swift-4 naming, MPIdentityApiRequest() and an
    Objective-C NSLog.
  • Usage samples that couldn't work: MParticle.User.* receiver and arity,
    Identity.getUserIdentities, addCCPAConsentState, and the callback-based
    getAttributions/isKitActive/getOptOut — the opt-out sample always opted users out.
  • Newly documented: Rokt (selectPlacements, RoktLayoutView, RoktEventManager), device
    consent, session/upload, TransactionAttributes, and Android's compileOnly Rokt kit.
  • Expo Version Support table trimmed to the rows reachable under the declared
    react-native >= 0.76.0 peer dependency.

Reviewer question: should logPushRegistration be retyped to accept null for iOS, or is
documenting "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/ and ExpoTestApp/, plus the mParticle Apple SDK 9 headers and its own Swift
example. trunk check --upstream=main reports no new issues on README.md; prettier --write also
normalized the pre-existing plugin-options table padding.

Copilot AI lite review requested due to automatic review settings September 2, 2026 19:30
@jamesnrokt
jamesnrokt requested a review from a team as a code owner September 2, 2026 19:30
@cursor

cursor Bot commented Sep 2, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only changes with no runtime or build impact; incorrect samples were replaced with API-accurate guidance.

Overview
README-only update so setup and usage match 3.x (Apple SDK 9, React Native ≥ 0.76, Rokt) instead of older SDK 8 / pre-0.76 guidance.

Installation & native setup now documents iOS 15.6, expanded CocoaPods pre_install pods (split Apple SDK + Rokt transitives), expo-build-properties deployment target, umbrella mParticle-Apple-SDK when no iosKits, RN 0.76+ Fabric RCTAppDependencyProvider for RoktLayoutView, mParticle_Apple_SDK_ObjC imports, and Android android-rokt-kit [6.0.1, 7.0) as an app dependency. Expo plugin behavior and version support table are tightened to the declared RN peer floor.

Usage samples are rewritten to match real APIs: User as instance methods via Identity.getCurrentUser, callback-based getAttributions / isKitActive / getOptOut, setCCPAConsentState, new MParticle.GDPRConsent / CCPAConsent, purchase TransactionAttributes, plus new sections for Rokt, device consent, session/upload, and location (Android-only). Rokt is added to the supported-features table.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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-kit as 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.

Comment thread README.md Outdated
thomson-t
thomson-t previously approved these changes Sep 2, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

3 participants