@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.
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
33
33
  ]
34
34
  s.dependency 'AmplitudeCore', '>=1.0.12', '<2.0.0'
35
35
  else
36
- s.dependency "AmplitudeEngagementSwift", "3.0.0"
36
+ s.dependency "AmplitudeEngagementSwift", "3.1.1"
37
37
  end
38
38
 
39
39
  install_modules_dependencies(s)
@@ -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.0.0"
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 ?: "", deviceId=deviceId, integrations = arrayOf(
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, device_id: String? = nil,
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:(nonnull NSString *)user_id device_id:(nonnull NSString *)device_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.0.0"}
1
+ {"version":"3.1.1"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amplitude/plugin-engagement-react-native",
3
- "version": "3.0.0",
3
+ "version": "3.1.1",
4
4
  "description": "Amplitude Engagement plugin for React Native",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",