You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ExpoTestApp/README.md
+19-31Lines changed: 19 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,14 @@ This app tests the Expo config plugin integration for the mParticle React Native
25
25
{
26
26
"expo": {
27
27
"plugins": [
28
+
[
29
+
"expo-build-properties",
30
+
{
31
+
"ios": {
32
+
"deploymentTarget": "15.6"
33
+
}
34
+
}
35
+
],
28
36
[
29
37
"react-native-mparticle",
30
38
{
@@ -81,18 +89,21 @@ The app also includes Rokt placement testing via the mParticle Rokt kit:
81
89
-**Overlay**: Loads a full-screen overlay Rokt placement that appears on top of the app content.
82
90
-**Bottom Sheet**: Loads a bottom sheet Rokt placement that slides up from the bottom of the screen.
83
91
-**Shoppable Ads**: Calls `MParticle.Rokt.selectShoppableAds` with a staging placement identifier and checkout-style attributes (see implementation guide below).
92
+
-**Close Rokt**: Calls `MParticle.Rokt.close()`.
93
+
-**Rokt Session**: Calls `MParticle.Rokt.setSessionId()` and `MParticle.Rokt.getSessionId()`.
84
94
85
95
The Rokt section also demonstrates:
86
96
87
97
- Platform-specific attributes (iOS vs Android configurations)
88
98
- Rokt event listeners for callbacks and placement events
89
99
- Using `RoktLayoutView` as an embedded placeholder component
90
100
91
-
### Implementation guide: Shoppable Ads (`selectShoppableAds`) and iOS payment extensions
92
-
93
-
This mirrors the recent SDK work (Shoppable Ads API on iOS and the Expo test app wiring) and how to pair it with native payment registration.
101
+
On Android, the Rokt session APIs require `android-core` and
102
+
`android-rokt-kit``5.79.0` or newer. If configured, the shared Expo
103
+
`customBaseUrl` setting is applied to Android through
Use `MParticle.Rokt.selectShoppableAds(identifier, attributes, roktConfig?)` when you need the Shoppable Ads experience instead of `selectPlacements`.
98
109
@@ -118,29 +129,7 @@ Listen for `RoktCallback` and `RoktEvents` on `RoktEventManager` to observe load
118
129
119
130
**Android:**`selectShoppableAds` is not implemented on Android yet; the native module logs a warning and does not run the Shoppable Ads flow. Plan for iOS-only behavior until Android support ships.
Shoppable Ads flows that use Apple Pay / Stripe integration expect a **payment extension** to be registered on mParticle’s Rokt interface after the SDK starts.
124
-
125
-
In `ios/MParticleExpoTest/AppDelegate.swift`, the test app:
126
-
127
-
1. Imports the Stripe payment extension module provided with the Rokt / kit stack: `import RoktStripePaymentExtension`.
128
-
2. After `MParticle.sharedInstance().start(with: mParticleOptions)`, constructs `RoktStripePaymentExtension(applePayMerchantId: "...")` with your **Apple Pay merchant ID** (replace `merchant.dummy` with your real `merchant.*` identifier from Apple Developer).
- The Expo config plugin **does not** generate the payment extension block today. After `expo prebuild`, add or merge this code into `AppDelegate.swift` (inside the same app launch path as mParticle init). If you regenerate native projects with `--clean`, re-apply this snippet.
143
-
- Ensure the **mParticle Rokt kit** (and transitive Rokt dependencies) are installed so `RoktStripePaymentExtension` resolves—same as configuring `iosKits`: `["mParticle-Rokt"]` in `app.json`.
132
+
The Expo plugin test app installs the standard mParticle Rokt kit only. Payment-extension installation and native URL callback forwarding are not generated by the plugin in this release.
144
133
145
134
All activity is logged in the Activity Log section at the bottom of the screen.
For Shoppable Ads with Apple Pay / Stripe, you may also need to register `RoktStripePaymentExtension` after `start`—see **Implementation guide: Shoppable Ads (`selectShoppableAds`) and iOS payment extensions** above.
175
-
176
163
#### Objective-C AppDelegate (Legacy)
177
164
178
165
For older Expo SDK versions, check `ios/MParticleExpoTest/AppDelegate.mm` for:
For standard Rokt placements, add the mParticle Rokt kit:
294
+
295
+
```ruby
296
+
pod 'mParticle-Rokt', '~> 9.2'
297
+
```
298
+
299
+
In Expo apps, use `iosKits: ["mParticle-Rokt"]` for standard Rokt placements. The Expo plugin does not add payment-extension pods or URL callback forwarding in this release.
300
+
301
+
See [MIGRATING.md](./MIGRATING.md) for release-specific migration guidance.
302
+
303
+
For Android integrations that use `MParticle.Rokt.setSessionId()` or
304
+
`MParticle.Rokt.getSessionId()`, `android-core` and `android-rokt-kit`
305
+
`5.79.0` or newer are required. Android CNAME setup through
306
+
`customBaseUrl` also requires `android-core` `5.79.0` or newer.
307
+
269
308
See [Identity](http://docs.mparticle.com/developers/sdk/ios/identity/) for more information on supplying an `MPIdentityApiRequest` object during SDK initialization.
270
309
271
310
4. Remember to start Metro with:
@@ -285,20 +324,28 @@ and build your workspace from xCode.
285
324
For more help, see [the Android set up docs](https://docs.mparticle.com/developers/sdk/android/getting-started/#create-an-input).
286
325
287
326
```kotlin
288
-
package com.example.myapp;
327
+
package com.example.myapp
289
328
290
-
import android.app.Application;
291
-
import com.mparticle.MParticle;
329
+
import android.app.Application
330
+
import com.mparticle.MParticle
331
+
import com.mparticle.MParticleOptions
332
+
import com.mparticle.networking.NetworkOptions
292
333
293
334
class MyApplication : Application() {
294
-
fun onCreate() {
335
+
override fun onCreate() {
295
336
super.onCreate()
296
337
val options: MParticleOptions = MParticleOptions.builder(this)
297
338
.credentials("REPLACE ME WITH KEY", "REPLACE ME WITH SECRET")
0 commit comments