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..47e0426 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,7 @@ package com.example.myapp; import android.app.Application; import com.mparticle.MParticle; +import com.mparticle.MParticleOptions; public class MyApplication extends Application { @Override @@ -100,6 +103,26 @@ class ExampleApplication : Application() { } ``` +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). @@ -117,7 +140,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 ``` @@ -200,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. 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.