Repository navigation
fix(ios): default the Swift Package Manager core SDK to 9.7.4 - #458
Conversation
In Swift Package Manager mode, pod install pins the mParticle core SDK, and every kit given without a version, to DEFAULT_CORE_VERSION exactly. At 9.6.1, the Rokt kit logs its placement analytics event with the attributes prepared for Rokt as custom attributes, including the user's filtered identities and MPID. The core forwards that event to every other configured kit. mparticle-apple-sdk 9.7.4 logs it with none (mParticle/mparticle-apple-sdk#1126), as the kit's README documents. The range in Package.swift does not cover this: it applies only to React Native's experimental Swift Package Manager mode. CocoaPods mode already resolves 9.7.4 from its range. The core and Rokt kit Package.swift files are unchanged between the two versions, and every kit in ios/mparticle_spm_kits.json has a v9.7.4 tag. The README examples move to the new default. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The requested iOS Sample App (SPM) check was reported as still running, so its success needs confirmation before merging.
No open issues 🎉
What changed in this PR
Updates the default iOS Swift Package Manager SDK version to 9.7.4 for the next major release, picking up the native placement analytics fix.
Changes:
- Raises the default core SDK and unversioned kits from 9.6.1 to 9.7.4.
- Aligns README and inline configuration examples with the new default.
- Preserves explicit version overrides and existing dependency ranges.
| File | Description |
|---|---|
| README.md | Updates version pin and installation output examples to 9.7.4. |
| ios/mparticle_spm.rb | Sets the default core version to 9.7.4 and updates its configuration example. |
Review effort: Balanced
There was a problem hiding this comment.
I reviewed this PR and didn't find any bugs. It's a clean version bump, but every path in this repo has a code owner, so someone on the owning team should still sign off on moving the default native SDK version.
What was reviewed:
DEFAULT_CORE_VERSIONinios/mparticle_spm.rb, its header comment, and the three README examples all moved from 9.6.1 to 9.7.4.- Searched for leftover 9.6.1 references. The Expo plugin has no default of its own, so it only passes
iosSdkVersionthrough when one is set, andios/mparticle_spm_kits.jsonpins no kit versions. The only remaining 9.6.1 strings are explicit user-set values injs/__tests__/plugin-ios-spm.test.tsand unrelatedespreelockfile entries.
Extended reasoning...
The change is a 5-line version-string bump across ios/mparticle_spm.rb and README.md. It changes the default Apple SDK core version used in Swift Package Manager mode, and kits listed without a version inherit it. It touches no auth, crypto or injection surface. It also brings in the native SDK's upstream 9.7.x changes, which this review cannot check from the diff. I deferred instead of approving because CODEOWNERS assigns every path to a code-owning team.
Why
iOS apps that take the mParticle SDK from Swift Package Manager, the default in this package's next major release, get the native SDK version this package picks unless they choose their own. Today that is 9.6.1. In that version the Rokt kit's placement analytics event carries the user's identities and mParticle ID as event attributes, and the SDK forwards the event to every other integration the app has turned on. The native SDK fixed this in 9.7.4: the event carries no attributes again, as the kit's documentation says. Once this lands, apps on the default get 9.7.4.
Programme
Release readiness for this package's next major release, at the maintainer's request. It follows react-native-mparticle#436, which made Swift Package Manager the iOS default.
What changes
Before: with no version set in the Podfile,
pod installpinned the mParticle core SDK, and every kit listed without a version, to 9.6.1. After: 9.7.4. The README examples moved with it; the changelog is generated at release. An app that sets$RNMParticleSPMCoreVersionkeeps its own pin. Left alone: the"9.2.2"..<"10.0.0"range inPackage.swift, which applies only to React Native's experimental Swift Package Manager mode, and the CocoaPods range, which already resolves 9.7.4.Linked work
Related: mParticle/mparticle-apple-sdk#1126, the native fix released in 9.7.4; react-native-mparticle#436, which made Swift Package Manager the iOS default.
Rollout
Path: merging publishes nothing. The change ships in the next major release. No published version is affected, because Swift Package Manager mode is in no release yet.
Feature flags: none. An app can pin another version with
$RNMParticleSPMCoreVersion.Turning it off: revert this pull request before the release; after it, the next release, since a published version cannot be recalled.
What we watch: the
iOS Sample App (SPM)check, which installs, tests and archives the sample with the new default. It is not a required check, so confirm it before merging.Risks
ios/mparticle_spm_kits.jsonhas av9.7.4tag; seen as apod installor package resolution failure.Risk class: low.
Who
Written by: an automated coding agent (Claude Code), from release-readiness checks the maintainer asked for.
Code reviewed before opening: a separate automated review agent, on 26 October 2026; no blocking findings, nothing changed.
Design reviewed before opening: no one.
Decision this implements: the maintainer's go-ahead on 26 October 2026 to change the default before the release (not public).
Checked: on 26 October 2026, with Xcode 27, the sample app in default Swift Package Manager mode with this change: a Debug simulator build, a Release archive and the single-copy check, with
Package.resolvedat 9.7.4 for the core and the Rokt kit;scripts/ios/mparticle_spm_test.rb, 7 runs, 0 failures. The core and Rokt kitPackage.swiftfiles are identical at v9.6.1 and v9.7.4.Not checked: Xcode 16 and the sample's native unit tests, which CI runs; a placement at runtime; Expo prebuild, which uses the same default.
Size
Hand-written: 5 added and 5 removed lines in 2 files.
Generated: none.
🤖 Generated with Claude Code