Skip to content

Commit cbb2a31

Browse files
committed
feat: send the WrapperSdk type to the kit
Send the ReactNative type to the base SDK
1 parent cc2f40a commit cbb2a31

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

android/src/main/java/com/mparticle/react/rokt/MPRoktModuleImpl.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import com.mparticle.MParticle
1515
import com.mparticle.MpRoktEventCallback
1616
import com.mparticle.RoktEvent
1717
import com.mparticle.UnloadReasons
18+
import com.mparticle.WrapperSdk
1819
import com.mparticle.rokt.CacheConfig
1920
import com.mparticle.rokt.RoktConfig
2021
import kotlinx.coroutines.Job
@@ -24,6 +25,11 @@ import kotlinx.coroutines.launch
2425
class MPRoktModuleImpl(
2526
private val reactContext: ReactApplicationContext,
2627
) {
28+
29+
init {
30+
MParticle.getInstance()?.setWrapperSdk(WrapperSdk.WrapperSdkReactNative, "")
31+
}
32+
2733
private var roktEventHandler: MpRoktEventCallback? = null
2834

2935
private val eventSubscriptions = mutableMapOf<String, Job?>()

android/src/newarch/java/com/mparticle/react/rokt/MPRoktModule.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ import java.util.concurrent.CountDownLatch
1717
class MPRoktModule(
1818
private val reactContext: ReactApplicationContext,
1919
) : NativeMPRoktSpec(reactContext) {
20-
init {
21-
MParticle.getInstance()?.setWrapperSdk(WrapperSdk.WrapperSdkReactNative, "")
22-
}
2320

2421
private val impl = MPRoktModuleImpl(reactContext)
2522

android/src/oldarch/java/com/mparticle/react/rokt/MPRoktModule.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ import java.lang.ref.WeakReference
1515
class MPRoktModule(
1616
private val reactContext: ReactApplicationContext,
1717
) : NativeMPRoktSpec(reactContext) {
18-
init {
19-
MParticle.getInstance()?.setWrapperSdk(WrapperSdk.WrapperSdkReactNative, "")
20-
}
2118

2219
private val impl = MPRoktModuleImpl(reactContext)
2320

ios/RNMParticle/RNMPRokt.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ - (void)selectPlacements:(NSString *)identifer
9090
MPRoktConfig *config = [self buildRoktConfigFromDict:roktConfig];
9191
#endif
9292

93+
[MParticle _setWrapperSdk_internal:MPWrapperSdkReactNative version:@""];
9394
// Create callback implementation
9495
MPRoktEventCallback *callbacks = [[MPRoktEventCallback alloc] init];
9596

0 commit comments

Comments
 (0)