@amplitude/plugin-engagement-react-native 2.0.3 → 2.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/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:2.
|
|
89
|
+
implementation "com.amplitude:amplitude-engagement-android:2.1.1"
|
|
90
90
|
|
|
91
91
|
// Amplitude Analytics SDK (required dependency)
|
|
92
92
|
implementation "com.amplitude:analytics-android:1.+"
|
|
@@ -28,9 +28,10 @@ var _id = 0
|
|
|
28
28
|
|
|
29
29
|
/// `@objc` attribute exposes Swift methods to the Objective-C runtime*
|
|
30
30
|
@objc public class AmplitudeEngagementAdapter: NSObject {
|
|
31
|
-
private static let logger = Logger(
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
private static let logger = Logger(
|
|
32
|
+
subsystem: "PluginEngagementReactNative",
|
|
33
|
+
category: "AmplitudeEngagementAdapter")
|
|
34
|
+
|
|
34
35
|
@objc public func newInstance(_ apiKey: String, _ options: [String: Any]?) -> Int {
|
|
35
36
|
if let existingId = instances.first(where: { $0.value.0 == apiKey })?.key {
|
|
36
37
|
return existingId
|
|
@@ -54,7 +55,7 @@ var _id = 0
|
|
|
54
55
|
logLevel = .verbose
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
+
|
|
58
59
|
var serverZone = AmplitudeServerZone.US
|
|
59
60
|
if let serverZoneStr: String = options?["serverZone"] as? String {
|
|
60
61
|
switch serverZoneStr.lowercased() {
|
|
@@ -66,14 +67,15 @@ var _id = 0
|
|
|
66
67
|
serverZone = .US
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
+
|
|
70
71
|
let locale = options?["locale"] as? String
|
|
71
|
-
let ignoreAnalyticsAutomaticScreenTracking =
|
|
72
|
+
let ignoreAnalyticsAutomaticScreenTracking =
|
|
73
|
+
options?["ignoreAnalyticsAutomaticScreenTracking"] as? Bool
|
|
72
74
|
|
|
73
75
|
let serverUrl = options?["serverUrl"] as? String
|
|
74
76
|
let cdnUrl = options?["cdnUrl"] as? String
|
|
75
77
|
let mediaUrl = options?["mediaUrl"] as? String
|
|
76
|
-
|
|
78
|
+
|
|
77
79
|
let initOptions = AmplitudeInitOptions(
|
|
78
80
|
serverZone: serverZone,
|
|
79
81
|
locale: locale,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.
|
|
1
|
+
{"version":"2.1.1"}
|
package/package.json
CHANGED