Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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).

Expand All @@ -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
```

Expand Down Expand Up @@ -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.


Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions ios/mparticle_flutter_sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading