Skip to content

feat: SPM Support and new MP SDKs#76

Open
BrandonStalnaker wants to merge 2 commits into
mainfrom
feat/Update-to-Latest-Rokt-SDKs
Open

feat: SPM Support and new MP SDKs#76
BrandonStalnaker wants to merge 2 commits into
mainfrom
feat/Update-to-Latest-Rokt-SDKs

Conversation

@BrandonStalnaker

@BrandonStalnaker BrandonStalnaker commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Background

  • 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)

@BrandonStalnaker BrandonStalnaker self-assigned this Jul 23, 2026
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

PR Summary

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.

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.

1 participant