Skip to content

Commit a130b07

Browse files
authored
docs: add v6 Rokt migration guidance (#706)
docs: add v6 Rokt migration notes Document v6 Rokt migration details so integrators can update imports and type usage after moving Rokt APIs into rokt-kit.
1 parent 224b9f5 commit a130b07

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

MIGRATING.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,69 @@ val state = ConsentState.builder()
331331

332332
ConsentState.builder().removeCCPAConsentState()
333333
```
334+
335+
---
336+
337+
### Rokt API moved from `android-core` to `rokt-kit`
338+
339+
Rokt APIs are now owned by the Rokt kit module. Usage remains the same (`MParticle.getInstance().Rokt()`); update imports to use the kit package types.
340+
341+
Kotlin:
342+
343+
```kotlin
344+
// Before
345+
import com.mparticle.Rokt
346+
347+
val rokt = MParticle.getInstance()?.Rokt()
348+
349+
// After
350+
import com.mparticle.kits.Rokt
351+
352+
val rokt = MParticle.getInstance()?.Rokt()
353+
```
354+
355+
Java:
356+
357+
```java
358+
// Before
359+
com.mparticle.Rokt rokt = MParticle.getInstance().Rokt();
360+
361+
// After
362+
com.mparticle.kits.Rokt rokt = MParticle.getInstance().Rokt();
363+
```
364+
365+
---
366+
367+
### Rokt wrapper types replaced with native Rokt SDK types
368+
369+
The following mParticle wrapper types were removed:
370+
371+
- `com.mparticle.RoktEvent`
372+
- `com.mparticle.MpRoktEventCallback`
373+
- `com.mparticle.rokt.RoktConfig`
374+
- `com.mparticle.rokt.PlacementOptions`
375+
376+
Use native Rokt SDK types instead:
377+
378+
- `com.rokt.roktsdk.RoktEvent`
379+
- `com.rokt.roktsdk.Rokt.RoktCallback`
380+
- `com.rokt.roktsdk.RoktConfig`
381+
- `com.rokt.roktsdk.PlacementOptions`
382+
383+
Kotlin:
384+
385+
```kotlin
386+
// Before
387+
val callback = object : MpRoktEventCallback { /* ... */ }
388+
val config = com.mparticle.rokt.RoktConfig.Builder().build()
389+
390+
// After
391+
val callback = object : com.rokt.roktsdk.Rokt.RoktCallback { /* ... */ }
392+
val config = com.rokt.roktsdk.RoktConfig.Builder().build()
393+
```
394+
395+
---
396+
397+
### `Rokt.prepareAttributesAsync(...)` is no longer public API
398+
399+
`prepareAttributesAsync` is now internal to the kit implementation and should not be called directly from app code.

0 commit comments

Comments
 (0)