react-native-ux-cam 5.4.13 → 5.4.14
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/CHANGELOG.md +1 -0
- package/RNUxcam.podspec +2 -3
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/uxcam/RNUxcamModule.java +31 -14
- package/ios/RNUxcam.m +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Version | Changes
|
|
7
7
|
------- | ----------
|
|
8
|
+
5.4.14 | Updated iOS SDK to 3.6.9 and Android to 3.6.21
|
|
8
9
|
5.4.13 | Updated iOS SDK to 3.6.7 and Android to 3.6.18, Updated minSdkVersion to 21 for Android
|
|
9
10
|
5.4.12 | Updated iOS SDK to 3.6.6 and Android to 3.6.16
|
|
10
11
|
5.4.11 | Updated iOS SDK to 3.6.5 and Android to 3.6.14
|
package/RNUxcam.podspec
CHANGED
package/android/build.gradle
CHANGED
|
@@ -3,6 +3,7 @@ package com.uxcam;
|
|
|
3
3
|
import android.view.View;
|
|
4
4
|
|
|
5
5
|
import com.facebook.react.bridge.Arguments;
|
|
6
|
+
import com.facebook.react.bridge.NoSuchKeyException;
|
|
6
7
|
import com.facebook.react.bridge.Promise;
|
|
7
8
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
8
9
|
import com.facebook.react.bridge.ReactContext;
|
|
@@ -12,6 +13,7 @@ import com.facebook.react.bridge.ReadableArray;
|
|
|
12
13
|
import com.facebook.react.bridge.ReadableMap;
|
|
13
14
|
import com.facebook.react.bridge.ReadableType;
|
|
14
15
|
import com.facebook.react.bridge.ReadableMapKeySetIterator;
|
|
16
|
+
import com.facebook.react.bridge.UnexpectedNativeTypeException;
|
|
15
17
|
import com.facebook.react.bridge.WritableArray;
|
|
16
18
|
import com.facebook.react.bridge.WritableMap;
|
|
17
19
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
@@ -35,7 +37,7 @@ import com.uxcam.datamodel.UXConfig;
|
|
|
35
37
|
|
|
36
38
|
public class RNUxcamModule extends ReactContextBaseJavaModule {
|
|
37
39
|
private static final String UXCAM_PLUGIN_TYPE = "react-native";
|
|
38
|
-
private static final String UXCAM_REACT_PLUGIN_VERSION = "5.4.
|
|
40
|
+
private static final String UXCAM_REACT_PLUGIN_VERSION = "5.4.14";
|
|
39
41
|
|
|
40
42
|
private static final String UXCAM_VERIFICATION_EVENT_KEY = "UXCam_Verification_Event";
|
|
41
43
|
private static final String PARAM_SUCCESS_KEY = "success";
|
|
@@ -306,32 +308,47 @@ public class RNUxcamModule extends ReactContextBaseJavaModule {
|
|
|
306
308
|
|
|
307
309
|
@ReactMethod
|
|
308
310
|
public void logEvent(String event) {
|
|
309
|
-
|
|
311
|
+
UXCam.logEvent(event);
|
|
310
312
|
}
|
|
311
313
|
|
|
312
314
|
@ReactMethod
|
|
313
315
|
public void logEvent(String event, ReadableMap properties) {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
HashMap<String, Object> map = new HashMap<String, Object>();
|
|
316
|
+
HashMap<String, Object> convertedProperties = new HashMap<>();
|
|
317
317
|
|
|
318
|
+
if (properties != null) {
|
|
318
319
|
ReadableMapKeySetIterator iterator = properties.keySetIterator();
|
|
320
|
+
|
|
319
321
|
while (iterator.hasNextKey()) {
|
|
320
322
|
String key = iterator.nextKey();
|
|
321
323
|
ReadableType type = properties.getType(key);
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
324
|
+
try {
|
|
325
|
+
switch (type) {
|
|
326
|
+
case Null:
|
|
327
|
+
convertedProperties.put(key, "");
|
|
328
|
+
case Boolean:
|
|
329
|
+
convertedProperties.put(key, properties.getBoolean(key));
|
|
330
|
+
break;
|
|
331
|
+
case Number:
|
|
332
|
+
convertedProperties.put(key, properties.getDouble(key));
|
|
333
|
+
break;
|
|
334
|
+
case String:
|
|
335
|
+
convertedProperties.put(key, properties.getString(key));
|
|
336
|
+
break;
|
|
337
|
+
case Map:
|
|
338
|
+
convertedProperties.put(key, properties.getMap(key).toString());
|
|
339
|
+
break;
|
|
340
|
+
case Array:
|
|
341
|
+
convertedProperties.put(key, properties.getArray(key).toString());
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
} catch (NullPointerException | NoSuchKeyException | UnexpectedNativeTypeException e) {
|
|
345
|
+
convertedProperties.put(key, "");
|
|
346
|
+
e.printStackTrace();
|
|
328
347
|
}
|
|
329
348
|
}
|
|
330
|
-
UXCam.logEvent(event, map);
|
|
331
|
-
} else {
|
|
332
|
-
UXCam.logEvent(event);
|
|
333
349
|
}
|
|
334
350
|
|
|
351
|
+
UXCam.logEvent(event, convertedProperties);
|
|
335
352
|
}
|
|
336
353
|
|
|
337
354
|
@ReactMethod
|
package/ios/RNUxcam.m
CHANGED
|
@@ -54,7 +54,7 @@ RCT_EXPORT_MODULE();
|
|
|
54
54
|
RCT_EXPORT_METHOD(startWithConfiguration:(NSDictionary *)config)
|
|
55
55
|
{
|
|
56
56
|
self.lastVerifyResult = nil;
|
|
57
|
-
[UXCam pluginType:@"react-native" version:@"5.4.
|
|
57
|
+
[UXCam pluginType:@"react-native" version:@"5.4.14"];
|
|
58
58
|
|
|
59
59
|
NSString *userAppKey = config[RNUxcam_AppKey];
|
|
60
60
|
if (!userAppKey || ![userAppKey isKindOfClass:NSString.class])
|
package/package.json
CHANGED