Skip to content

feat: upgrade native SDKs to mParticle Android 6.0.0 / Apple 9.3.1 - #50

Merged
denischilik merged 4 commits into
mainfrom
feat/native-sdk-upgrade
Jul 29, 2026
Merged

feat: upgrade native SDKs to mParticle Android 6.0.0 / Apple 9.3.1#50
denischilik merged 4 commits into
mainfrom
feat/native-sdk-upgrade

Conversation

@denischilik

Copy link
Copy Markdown
Contributor

Background

  • We are upgrading the MAUI SDK to the latest native mParticle SDKs to stay in sync with the React Native and Flutter wrappers.
  • mParticle Android SDK 6.0.0 is a breaking release: the Rokt API was extracted from android-core into the optional android-rokt-kit (com.mparticle.kits), and a few core APIs were removed/renamed. The previous branch had bumped the AAR/SPM versions but the Android Rokt glue still targeted the SDK 5.x com.mparticle.* layout, so the core binding no longer compiled.
  • Goal: finish the native upgrade with minimal changes and without changing the public MAUI C# API.

What Has Changed

Versions

  • Android: core / rokt-kit 5.79.06.0.0, Kotlin 1.9.02.1.20, Rokt SDK 6.0.1 / RoktUX 1.0.0, coil2 → coil3.
  • iOS: Apple SDK 9.2.09.3.1, Rokt integration 9.2.09.3.1, Rokt Stripe payment extension 2.0.12.0.3.

Android Rokt re-pointed to the kit

  • Removed the core Kotlin helper MParticleSdkBinding.kt and the Rokt entries from the core android/Transforms/Metadata.xml (Rokt is gone from com.mparticle.* in 6.0.0).
  • Added a thin kit-side bridge MParticleRoktBinding.kt (com.mparticle.mparticleroktbinding) that calls com.mparticle.kits.rokt and flattens the Kotlin Flow / com.rokt.roktsdk.RoktEvent types into a Map<String,String>, so the managed kit does not need to bind those types.
  • Added remove-node entries to the kit Metadata.xml (avoids binding the Kotlin Rokt surface and resolves the com.mparticle.kits.Rokt class / com.mparticle.kits.rokt package name collision).
  • Rewrote android/RoktPlatform.cs to route through the bridge and use Com.Mparticle.Kits.RoktEmbeddedView. The AndroidRoktApi(MParticle) constructor and NativeHandle are preserved, so RoktExtensions.cs and the Payments kit are untouched.

Other Android SDK 6 breaking changes (core, public API unchanged)

  • IdentityApiRequest.Builder.userAliasHandler was removed → UserAliasHandler is now a no-op on Android; removed UserAliasHandlerWrapper.cs.
  • androidIdDisabled(bool)androidIdEnabled(bool); MParticleOptions.IdDisabled is mapped with inverted semantics.

Public API

  • No changes to RoktApi, MParticleRoktExtensions, RoktTypes, or the Payments RoktShoppableAdsExtensions.

Screenshots/Video

  • N/A (binding/version upgrade).

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation (CHANGELOG).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

  • Builds verified locally (all green, 0 errors):

    Android iOS
    core SampleApp
    Rokt + Payments SampleApp

    The Android kit build emits only harmless BG8605/BG8403 binding warnings (we intentionally do not bind the Flow / roktsdk types). trunk check is clean.

  • On Android, RoktConfig and SelectShoppableAds remain no-ops (parity with the previous behavior / other wrappers); iOS is unaffected since Rokt stays in the Apple core SDK.

  • Heads-up: both gradlew wrappers had a malformed cd "$(dirname \"$PRG\")/" line (stray escaped quotes) that prevented the native binding gradle build from starting locally; fixed by removing the backslashes. Happy to drop this if you'd prefer to handle it separately.

Bumps the native bindings to mParticle Android SDK 6.0.0 (Kotlin 2.1.20,
Rokt SDK 6.0.1 / RoktUX 1.0.0, coil3) and mParticle Apple SDK 9.3.1
(Rokt 9.3.1, Rokt Stripe payment extension 2.0.3).

Android SDK 6 extracted the Rokt API out of android-core into the optional
android-rokt-kit (com.mparticle.kits). Re-point the managed Rokt binding at
the kit through a thin com.mparticle.mparticleroktbinding helper that flattens
the Kotlin Flow / roktsdk event types into a primitive string map, so the C#
kit does not bind those types. The core binding no longer surfaces Rokt.

Also handle two other Android SDK 6 breaking changes in the core binding
without touching the public MAUI C# API:
- IdentityApiRequest.Builder.userAliasHandler was removed; UserAliasHandler is
  now a no-op on Android (public surface retained).
- androidIdDisabled(bool) was replaced by androidIdEnabled(bool); IdDisabled is
  mapped with inverted semantics.

The public MAUI C# API surface is unchanged. Core, Rokt, and Payments sample
apps build on Android and iOS.
@denischilik
denischilik requested a review from a team as a code owner July 28, 2026 17:21
@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Large native and dependency churn (Rokt, Compose, identity aliasing no-op on Android) affects analytics, placements, and identity flows despite an unchanged C# surface.

Overview
Upgrades the MAUI bindings to mParticle Android SDK 6.0.0 and Apple SDK 9.3.1 (plus Rokt 9.3.1 / Stripe extension 2.0.3) while keeping the public C# API stable.

On Android, Rokt is no longer in android-core: the core binding drops Rokt metadata and MParticleSdkBinding.kt, and the Rokt kit routes through a new MParticleRoktBinding Kotlin helper that calls com.mparticle.kits and flattens Kotlin Flow / roktsdk events into string maps for C#. RoktPlatform.cs is rewritten to use that bridge and Com.Mparticle.Kits.RoktEmbeddedView; kit Metadata.xml strips unbindable Rokt types. Native artifacts move to Rokt SDK 6.x, coil3, and a bumped Jetpack Compose 1.11 stack in the Rokt csproj.

SDK 6 compatibility in core: MParticleOptions.IdDisabled maps to androidIdEnabled(!IdDisabled); request-scoped UserAliasHandler is no longer wired (wrapper removed, documented no-op). iOS is primarily SPM pin bumps. gradlew cd quoting is fixed so native Gradle builds can start.

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

thomson-t
thomson-t previously approved these changes Jul 28, 2026
Restore Android RoktConfig parity from SDK 5.x. The 6.0.0 migration
stubbed SelectPlacements' config as a no-op; forward color mode and
cache configuration through the com.mparticle.mparticleroktbinding
helper, which now builds the relocated com.rokt.roktsdk.RoktConfig.
Public MAUI API is unchanged.
Comment thread Sdk/MParticle.Maui.Sdk/MParticle.Maui.Sdk.csproj Outdated
Package the retrofit2 kotlinx-serialization converter jar that the Rokt
SDK network layer needs at runtime; without it the kit crashed on init
with ClassNotFoundException for KotlinSerializationConverterFactory.

Bump the Jetpack Compose stack to 1.11.x (and the Activity 1.13 /
Lifecycle 2.11 / Collection 1.6 / Fragment 1.8.9 / Kotlin StdLib 2.4 /
Serialization 1.11 cascade it requires). Rokt UX 9.3 is compiled against
Compose 1.9+ and the previous 1.8.x bindings crashed at layout render
with a rememberSaveable NoSuchMethodError. The 1.11.x line also resolves
the runtime-annotation Kotlin-Multiplatform duplicate-class dex error.
thomson-t
thomson-t previously approved these changes Jul 29, 2026
The three NuGet project versions had been bumped to 5.0.0 in this feature
branch while the VERSION file stayed at 4.2.0, which the release tooling flagged
as drift. Versioning is owned by the release workflow: "Create draft release"
bumps VERSION and all csproj <Version> together and opens a dedicated release
PR, and merging a VERSION change to main triggers the publish-to-nuget.org
workflow. Manually bumping versions in a feature PR both reintroduces the drift
and would trigger a premature production release on merge. Revert to 4.2.0 so
this PR is version-neutral; the major bump to 5.0.0 will be done via the release
workflow.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 058eeca. Configure here.

Comment thread Kits/rokt/Sdk/MParticle.Maui.Rokt/android/RoktPlatform.cs
@denischilik
denischilik merged commit ea3cee2 into main Jul 29, 2026
4 checks passed
@denischilik
denischilik deleted the feat/native-sdk-upgrade branch July 29, 2026 17:54
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