@amplitude/plugin-engagement-react-native 3.0.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PluginEngagementReactNative.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/amplitude/pluginengagementreactnative/PluginEngagementReactNativeModule.kt +1 -1
- package/ios/AmplitudeEngagementAdapter.swift +1 -1
- package/ios/PluginEngagementReactNative.mm +1 -1
- package/lib/module/build-version.json +1 -1
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -86,7 +86,7 @@ dependencies {
|
|
|
86
86
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
87
87
|
|
|
88
88
|
// Amplitude Engagement SDK
|
|
89
|
-
implementation "com.amplitude:amplitude-engagement-android:3.
|
|
89
|
+
implementation "com.amplitude:amplitude-engagement-android:3.1.1"
|
|
90
90
|
|
|
91
91
|
// Amplitude Analytics SDK (required dependency)
|
|
92
92
|
implementation "com.amplitude:analytics-android:1.+"
|
|
@@ -117,7 +117,7 @@ class PluginEngagementReactNativeModule(val reactContext: ReactApplicationContex
|
|
|
117
117
|
val self = this
|
|
118
118
|
runBlocking(Dispatchers.Main) {
|
|
119
119
|
Log.d("PluginEngagementReactNativeModule", "boot: $userId, $deviceId")
|
|
120
|
-
val options = AmplitudeBootOptions(userId=userId
|
|
120
|
+
val options = AmplitudeBootOptions(userId = userId, deviceId = deviceId, integrations = arrayOf(
|
|
121
121
|
{ event: BaseEvent ->
|
|
122
122
|
try {
|
|
123
123
|
val serializedEvent = mapOf(
|
|
@@ -106,7 +106,7 @@ var _id = 0
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
@objc public func boot(
|
|
109
|
-
_ instanceId: Int, _ user_id: String
|
|
109
|
+
_ instanceId: Int, _ user_id: String?, device_id: String? = nil,
|
|
110
110
|
integration: @escaping (_ event_type: String, _ event: [String: Any]) -> Void
|
|
111
111
|
) {
|
|
112
112
|
DispatchQueue.main.sync {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
return @"PluginEngagementReactNative";
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
- (void)boot:(double)id user_id:(
|
|
38
|
+
- (void)boot:(double)id user_id:(NSString *)user_id device_id:(NSString *)device_id {
|
|
39
39
|
void (^callback)(NSString *, NSDictionary *) = ^(NSString *event_type, NSDictionary *event) {
|
|
40
40
|
[self emitOnTrackEvent:@{@"event_type": event_type, @"event_properties": event}];
|
|
41
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"3.
|
|
1
|
+
{"version":"3.1.1"}
|
package/package.json
CHANGED