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
The Flutter plugin was pinned to older native SDKs (mParticle-Apple-SDK ~> 9.2, android-core:5.79.0) and only supported iOS integration via CocoaPods.
mParticle has released Apple SDK 9.3.1 and Android SDK 6.0.0, which include API changes (especially around Rokt), stricter platform requirements, and new capabilities like device-level consent and Swift Package Manager support in the Apple SDK.
Flutter now recommends dual CocoaPods + SPM support for plugins, and Android 6.0 moves Rokt types out of android-core and removes several deprecated APIs used by the existing bridge.
Rokt Kit Availability for exposed classes like RoktEmbeddedView means we need to guard against whether or not Kit is included
What Has Changed
Bumped native dependencies to Apple SDK ~> 9.3 and Android SDK 6.0.0 (android-core + android-rokt-kit), and released plugin version 2.2.0.
Added Swift Package Manager support for iOS: new ios/mparticle_flutter_sdk/Package.swift, relocated native sources under ios/mparticle_flutter_sdk/Sources/, and updated the podspec paths for CocoaPods compatibility.
Migrated the Android bridge to SDK 6.0 APIs: updated Rokt imports/packages (com.mparticle.kits, com.rokt.roktsdk), switched from Rokt() to MParticle.rokt, replaced UserAttributeListener with TypedUserAttributeListener, and removed onMarginChanged padding callbacks removed upstream.
Raised Android minSdkVersion from 16 to 23 and updated Kotlin to 2.1.20 to satisfy Android 6.0 / Rokt 6.x requirements.
Updated example app, README, and CHANGELOG to reflect the new versions and migration notes.
Checklist
I have performed a self-review of my own code.
I have made corresponding changes to the documentation.
I have added tests that prove my fix is effective or that my feature works.
I have tested this locally.
Reference Issue (For employees only. Ignore if you are an outside contributor)
Medium Risk
Breaking Android minSdk and optional Rokt dependency behavior can break builds or Rokt integrations if apps do not add android-rokt-kit 6.x; native bridge changes affect commerce/Rokt event paths.
Overview Release 2.2.0 bumps native stacks to mParticle Apple SDK ~> 9.3 and Android 6.0.0, with Android minSdk 23 and Kotlin 2.1.20.
iOS adds Swift Package Manager via Package.swift, moves plugin sources under ios/mparticle_flutter_sdk/Sources/, and updates the podspec paths so CocoaPods and SPM can both consume the plugin.
Android migrates the Rokt bridge to SDK 6.0 (com.mparticle.kits, com.rokt.roktsdk, MParticle.rokt), switches user attributes to TypedUserAttributeListener, and drops Rokt layout padding (onMarginChanged) callbacks removed upstream. Rokt logic is extracted into RoktBridge behind RoktKitAvailability: the plugin depends on android-rokt-kit as compileOnly and only registers platform views / handles Rokt method channels when RoktEmbeddedView is on the app classpath; otherwise Rokt calls error with a clear message. Apps that use Rokt must add android-rokt-kit explicitly (documented in README and MIGRATING.md).
Reviewed by Cursor Bugbot for commit 35d04bf. 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.
Background
What Has Changed
Checklist
Reference Issue (For employees only. Ignore if you are an outside contributor)