From 0d7ef3a7acca7e6c18b39944eab60da93b314c1e Mon Sep 17 00:00:00 2001 From: Denis Chilik Date: Thu, 14 May 2026 14:45:19 -0400 Subject: [PATCH 1/2] docs: align Flutter native dependency versions for CNAME updates Pin Android mParticle/Rokt dependencies to 5.79.0 and update iOS pod guidance to 9.2 while documenting native CNAME configuration examples for both platforms. --- CHANGELOG.md | 10 ++++++++++ README.md | 17 +++++++++++++++-- android/build.gradle | 2 +- example/android/app/build.gradle | 4 ++-- ios/mparticle_flutter_sdk.podspec | 4 ++-- 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d710b4..f5d0a3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add support for Apple SDK `MPNetworkOptions.customBaseURL` configuration in iOS initialization examples for CNAME routing. +- Add Android initialization examples for CNAME routing via `NetworkOptions.withNetworkOptions(...)`. + +### Changed + +- Bump iOS CocoaPods dependency from `mParticle-Apple-SDK ~> 9.1` to `~> 9.2`. +- Pin Android Gradle dependencies in plugin/example docs to `android-core:5.79.0` and `android-rokt-kit:5.79.0`. + ## [2.0.0] - 2026-04-17 ### Added diff --git a/README.md b/README.md index a8ac475..470431b 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,9 @@ To install mParticle on an Android platform: ```groovy dependencies { - implementation 'com.mparticle:android-core:5+' + implementation 'com.mparticle:android-core:5.79.0' + // Required only if you use Rokt APIs from Flutter + implementation 'com.mparticle:android-rokt-kit:5.79.0' // Required for gathering Android Advertising ID (see below) implementation 'com.google.android.gms:play-services-ads-identifier:16.0.0' @@ -63,6 +65,8 @@ package com.example.myapp; import android.app.Application; import com.mparticle.MParticle; +import com.mparticle.MParticleOptions; +import com.mparticle.networking.NetworkOptions; public class MyApplication extends Application { @Override @@ -70,6 +74,7 @@ public class MyApplication extends Application { super.onCreate(); MParticleOptions options = MParticleOptions.builder(this) .credentials("REPLACE ME WITH KEY","REPLACE ME WITH SECRET") + .networkOptions(NetworkOptions.withNetworkOptions("https://rkt.example.com")) .setLogLevel(MParticle.LogLevel.VERBOSE) .identify(identifyRequest) .identifyTask( @@ -88,12 +93,14 @@ public class MyApplication extends Application { ```kotlin import com.mparticle.MParticle import com.mparticle.MParticleOptions +import com.mparticle.networking.NetworkOptions class ExampleApplication : Application() { override fun onCreate() { super.onCreate() val options = MParticleOptions.builder(this) .credentials("REPLACE ME WITH KEY", "REPLACE ME WITH SECRET") + .networkOptions(NetworkOptions.withNetworkOptions("https://rkt.example.com")) .build() MParticle.start(options) } @@ -117,7 +124,7 @@ To install mParticle on an iOS platform: 2. Install the SDK using CocoaPods: ```bash -$ # Update your Podfile to depend on 'mParticle-Apple-SDK' version 9.1.0 or later +$ # Update your Podfile to depend on 'mParticle-Apple-SDK' version 9.2.0 or later $ pod install ``` @@ -136,6 +143,9 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions lau // Override point for customization after application launch. let mParticleOptions = MParticleOptions(key: "<<>>", secret: "<<>>") + let networkOptions = MPNetworkOptions() + networkOptions.customBaseURL = URL(string: "https://rkt.example.com") + mParticleOptions.networkOptions = networkOptions //Please see the Identity page for more information on building this object let request = MPIdentityApiRequest() @@ -182,6 +192,9 @@ Next, you'll need to start the SDK: MParticleOptions *mParticleOptions = [MParticleOptions optionsWithKey:@"REPLACE ME" secret:@"REPLACE ME"]; + MPNetworkOptions *networkOptions = [MPNetworkOptions new]; + networkOptions.customBaseURL = [NSURL URLWithString:@"https://rkt.example.com"]; + mParticleOptions.networkOptions = networkOptions; //Please see the Identity page for more information on building this object MPIdentityApiRequest *request = [MPIdentityApiRequest requestWithEmptyUser]; diff --git a/android/build.gradle b/android/build.gradle index 2135b42..03f35fe 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -48,7 +48,7 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation 'com.mparticle:android-core:5+' + implementation 'com.mparticle:android-core:5.79.0' // Required for Rokt event subscription implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.1" diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index c7b540d..ee3af85 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -70,9 +70,9 @@ flutter { dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5' - implementation 'com.mparticle:android-core:5+' + implementation 'com.mparticle:android-core:5.79.0' - implementation 'com.mparticle:android-rokt-kit:5+' + implementation 'com.mparticle:android-rokt-kit:5.79.0' // Required for gathering Android Advertising ID (see below) implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' diff --git a/ios/mparticle_flutter_sdk.podspec b/ios/mparticle_flutter_sdk.podspec index 69c2687..4180c88 100644 --- a/ios/mparticle_flutter_sdk.podspec +++ b/ios/mparticle_flutter_sdk.podspec @@ -15,8 +15,8 @@ mParticle Flutter Wrapper s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - # SDK 9.1 umbrella pod pulls required transitive dependencies. - s.dependency 'mParticle-Apple-SDK', '~> 9.1' + # SDK 9.2 umbrella pod pulls required transitive dependencies. + s.dependency 'mParticle-Apple-SDK', '~> 9.2' s.platform = :ios, '15.6' # Flutter.framework does not contain a i386 slice. From 4faeef9de248bbaaf581f2c9b05fe45181d8bd6e Mon Sep 17 00:00:00 2001 From: Denis Chilik Date: Mon, 18 May 2026 09:41:02 -0400 Subject: [PATCH 2/2] docs: move CNAME config to optional sections Keep Android and iOS initialization snippets minimal by removing custom CNAME setup from the default path, and document CNAME configuration in separate optional examples. --- README.md | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 470431b..47e0426 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,6 @@ package com.example.myapp; import android.app.Application; import com.mparticle.MParticle; import com.mparticle.MParticleOptions; -import com.mparticle.networking.NetworkOptions; public class MyApplication extends Application { @Override @@ -74,7 +73,6 @@ public class MyApplication extends Application { super.onCreate(); MParticleOptions options = MParticleOptions.builder(this) .credentials("REPLACE ME WITH KEY","REPLACE ME WITH SECRET") - .networkOptions(NetworkOptions.withNetworkOptions("https://rkt.example.com")) .setLogLevel(MParticle.LogLevel.VERBOSE) .identify(identifyRequest) .identifyTask( @@ -93,20 +91,38 @@ public class MyApplication extends Application { ```kotlin import com.mparticle.MParticle import com.mparticle.MParticleOptions -import com.mparticle.networking.NetworkOptions class ExampleApplication : Application() { override fun onCreate() { super.onCreate() val options = MParticleOptions.builder(this) .credentials("REPLACE ME WITH KEY", "REPLACE ME WITH SECRET") - .networkOptions(NetworkOptions.withNetworkOptions("https://rkt.example.com")) .build() MParticle.start(options) } } ``` +Optional: if your team uses a custom CNAME endpoint, configure `NetworkOptions` separately: + +```java +import com.mparticle.networking.NetworkOptions; + +MParticleOptions options = MParticleOptions.builder(this) + .credentials("REPLACE ME WITH KEY","REPLACE ME WITH SECRET") + .networkOptions(NetworkOptions.withNetworkOptions("https://rkt.example.com")) + .build(); +``` + +```kotlin +import com.mparticle.networking.NetworkOptions + +val options = MParticleOptions.builder(this) + .credentials("REPLACE ME WITH KEY", "REPLACE ME WITH SECRET") + .networkOptions(NetworkOptions.withNetworkOptions("https://rkt.example.com")) + .build() +``` + > **Warning:** Don't log events in your `Application.onCreate()`. Android may instantiate your `Application` class for a lot of reasons, in the background, while the user isn't even using their device. For more help, see [the Android set up docs](https://docs.mparticle.com/developers/sdk/android/getting-started/#create-an-input). @@ -143,9 +159,6 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions lau // Override point for customization after application launch. let mParticleOptions = MParticleOptions(key: "<<>>", secret: "<<>>") - let networkOptions = MPNetworkOptions() - networkOptions.customBaseURL = URL(string: "https://rkt.example.com") - mParticleOptions.networkOptions = networkOptions //Please see the Identity page for more information on building this object let request = MPIdentityApiRequest() @@ -192,9 +205,6 @@ Next, you'll need to start the SDK: MParticleOptions *mParticleOptions = [MParticleOptions optionsWithKey:@"REPLACE ME" secret:@"REPLACE ME"]; - MPNetworkOptions *networkOptions = [MPNetworkOptions new]; - networkOptions.customBaseURL = [NSURL URLWithString:@"https://rkt.example.com"]; - mParticleOptions.networkOptions = networkOptions; //Please see the Identity page for more information on building this object MPIdentityApiRequest *request = [MPIdentityApiRequest requestWithEmptyUser]; @@ -213,6 +223,20 @@ Next, you'll need to start the SDK: } ``` +Optional: if your team uses a custom CNAME endpoint, configure `MPNetworkOptions` separately: + +```swift +let networkOptions = MPNetworkOptions() +networkOptions.customBaseURL = URL(string: "https://rkt.example.com") +mParticleOptions.networkOptions = networkOptions +``` + +```objective-c +MPNetworkOptions *networkOptions = [MPNetworkOptions new]; +networkOptions.customBaseURL = [NSURL URLWithString:@"https://rkt.example.com"]; +mParticleOptions.networkOptions = networkOptions; +``` + See [Identity](https://docs.mparticle.com/developers/sdk/ios/idsync/) for more information on supplying an `MPIdentityApiRequest` object during SDK initialization.