react-native-trustdevice 1.1.4 → 1.1.5

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.
Files changed (52) hide show
  1. package/README.md +4 -4
  2. package/android/build/.transforms/34a3c3baa7ee620e604d2c62960577c0/transformed/classes/classes.dex +0 -0
  3. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  4. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  5. package/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -1954
  6. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
  7. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +1 -1
  8. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +1 -1
  9. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +1 -1
  10. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +1 -1
  11. package/android/build/intermediates/javac/debug/classes/com/trustdevice/utils/TDUniRiskUtils.class +0 -0
  12. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -1
  13. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  14. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -1446
  15. package/android/build/outputs/logs/manifest-merger-debug-report.txt +9 -18
  16. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  17. package/android/build.gradle +2 -12
  18. package/android/src/main/AndroidManifest.xml +1 -2
  19. package/android/src/main/java/com/trustdevice/utils/TDUniRiskUtils.java +13 -0
  20. package/ios/TrustDevice.m +16 -1
  21. package/ios/TrustDeviceSe.m +16 -1
  22. package/package.json +6 -2
  23. package/android/.gradle/8.10/checksums/checksums.lock +0 -0
  24. package/android/.gradle/8.10/checksums/md5-checksums.bin +0 -0
  25. package/android/.gradle/8.10/checksums/sha1-checksums.bin +0 -0
  26. package/android/.gradle/8.10/dependencies-accessors/gc.properties +0 -0
  27. package/android/.gradle/8.10/fileChanges/last-build.bin +0 -0
  28. package/android/.gradle/8.10/fileHashes/fileHashes.bin +0 -0
  29. package/android/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
  30. package/android/.gradle/8.10/gc.properties +0 -0
  31. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  32. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  33. package/android/.gradle/nb-cache/trust/6BEC0066B99297FC163AB3C2D5CC7668CDC2525F18622C2FFD1FE9D77756146A +0 -1
  34. package/android/.gradle/vcs-1/gc.properties +0 -0
  35. package/android/build/.transforms/41053347d20d0a776c1e1d56e9cc047e/transformed/classes/classes.dex +0 -0
  36. package/android/build/.transforms/5932fa5b98f0003ce689cad35520f6df/results.bin +0 -1
  37. package/android/build/.transforms/5932fa5b98f0003ce689cad35520f6df/transformed/classes/classes.dex +0 -0
  38. package/android/build/.transforms/ff2232c43c8cccbad5f33e76433cddb2/results.bin +0 -1
  39. package/android/build/.transforms/ff2232c43c8cccbad5f33e76433cddb2/transformed/classes/classes.dex +0 -0
  40. package/android/build/generated/source/buildConfig/debug/com/trustdevice/BuildConfig.java +0 -10
  41. package/android/build/intermediates/aar_main_jar/debug/classes.jar +0 -0
  42. package/android/build/intermediates/annotations_typedef_file/debug/typedefs.txt +0 -0
  43. package/android/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
  44. package/android/build/intermediates/javac/debug/classes/com/trustdevice/BuildConfig.class +0 -0
  45. package/android/build/intermediates/merged_java_res/debug/feature-react-native-trustdevice.jar +0 -0
  46. package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +0 -18
  47. package/android/build/outputs/aar/react-native-trustdevice-debug.aar +0 -0
  48. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/TrustdevicePackage.class.uniqueId1 +0 -0
  49. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/TrustdeviceSeModule$1.class.uniqueId0 +0 -0
  50. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/TrustdeviceSeModule$2.class.uniqueId3 +0 -0
  51. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/TrustdeviceSeModule.class.uniqueId2 +0 -0
  52. /package/android/build/.transforms/{41053347d20d0a776c1e1d56e9cc047e → 34a3c3baa7ee620e604d2c62960577c0}/results.bin +0 -0
@@ -1,25 +1,16 @@
1
1
  -- Merging decision tree log ---
2
2
  manifest
3
- ADDED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml:2:1-5:12
4
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml:2:1-5:12
5
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml:2:1-5:12
3
+ ADDED from /Users/rhett/Code/dun/reactnew/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml:2:1-4:12
4
+ INJECTED from /Users/rhett/Code/dun/reactnew/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml:2:1-4:12
6
5
  package
7
- ADDED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml:3:11-36
8
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
9
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
6
+ INJECTED from /Users/rhett/Code/dun/reactnew/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
10
7
  xmlns:android
11
- ADDED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml:2:11-69
8
+ ADDED from /Users/rhett/Code/dun/reactnew/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml:2:11-69
12
9
  uses-sdk
13
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
14
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
15
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
16
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
17
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
10
+ INJECTED from /Users/rhett/Code/dun/reactnew/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
11
+ INJECTED from /Users/rhett/Code/dun/reactnew/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
12
+ INJECTED from /Users/rhett/Code/dun/reactnew/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
18
13
  android:targetSdkVersion
19
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
20
- ADDED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
21
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
14
+ INJECTED from /Users/rhett/Code/dun/reactnew/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
22
15
  android:minSdkVersion
23
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
24
- ADDED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
25
- INJECTED from /Users/rhett/Code/dun/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
16
+ INJECTED from /Users/rhett/Code/dun/reactnew/TrustDeviceReactNative/node_modules/react-native-trustdevice/android/src/main/AndroidManifest.xml
@@ -1,18 +1,8 @@
1
-
2
- buildscript {
3
- repositories {
4
- google()
5
- mavenCentral()
6
- }
7
-
8
- dependencies {
9
- classpath("com.android.tools.build:gradle:4.1.3")
10
- }
11
- }
12
-
13
1
  apply plugin: 'com.android.library'
14
2
 
15
3
  android {
4
+ namespace 'com.trustdevice' // 添加这一行,AGP8.0+需要namespace
5
+
16
6
  compileSdkVersion 34
17
7
 
18
8
  defaultConfig {
@@ -1,6 +1,5 @@
1
1
 
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- package="com.trustdevice">
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
4
3
 
5
4
  </manifest>
6
5
 
@@ -13,6 +13,7 @@ public class TDUniRiskUtils {
13
13
  static final String KEY_APPKEY = "appKey";
14
14
  static final String KEY_APPNAME = "appName";
15
15
  static final String KEY_COUNTRY = "country";
16
+ static final String KEY_DATACENTER = "dataCenter";
16
17
  static final String KEY_CHANNEL = "channel";
17
18
  static final String KEY_DEBUG = "debug";
18
19
  static final String KEY_TIME_LIMIT = "timeLimit";
@@ -71,6 +72,12 @@ public class TDUniRiskUtils {
71
72
  builder.country(country.toUpperCase());
72
73
  }
73
74
  }
75
+ if (configMap.containsKey(KEY_DATACENTER)) {
76
+ String dataCenter = (String) configMap.get(KEY_DATACENTER);
77
+ if (!TextUtils.isEmpty(dataCenter)) {
78
+ builder.country(dataCenter.toUpperCase());
79
+ }
80
+ }
74
81
  // if (configMap.containsKey(KEY_URL)) {
75
82
  // String url = (String) configMap.get(KEY_URL);
76
83
  // if (!TextUtils.isEmpty(url)) {
@@ -232,6 +239,12 @@ public class TDUniRiskUtils {
232
239
  builder.country(country.toUpperCase());
233
240
  }
234
241
  }
242
+ if (configMap.containsKey(KEY_DATACENTER)) {
243
+ String dataCenter = (String) configMap.get(KEY_DATACENTER);
244
+ if (!TextUtils.isEmpty(dataCenter)) {
245
+ builder.country(dataCenter.toUpperCase());
246
+ }
247
+ }
235
248
  if (configMap.containsKey(KEY_DEBUG)) {
236
249
  Object debug = configMap.get(KEY_DEBUG);
237
250
  if (debug != null) {
package/ios/TrustDevice.m CHANGED
@@ -27,7 +27,22 @@ RCT_REMAP_METHOD(getSDKVersion,
27
27
  RCT_EXPORT_METHOD(initWithOptions:(NSDictionary*)options)
28
28
  {
29
29
  NSMutableDictionary* mutableOptions = [options mutableCopy];
30
- mutableOptions[@"allowd"] = options[@"debug"];
30
+
31
+ // 1. 判断 debug 是否为空(nil 或 NSNull)
32
+ id debugValue = options[@"debug"];
33
+ if (debugValue && debugValue != [NSNull null]) {
34
+ mutableOptions[@"allowd"] = debugValue; // 原逻辑保留
35
+ } else {
36
+ // debug 为空时,可能设置默认值或不设置
37
+ mutableOptions[@"allowd"] = @(NO); // 示例默认 false
38
+ }
39
+
40
+ // 2. 增加 dataCenter 赋值给 country
41
+ id dataCenter = options[@"dataCenter"];
42
+ if (dataCenter && dataCenter != [NSNull null]) {
43
+ mutableOptions[@"country"] = dataCenter;
44
+ }
45
+
31
46
  TDMobRiskManager_t *manager = [TDMobRiskManager sharedManager];
32
47
  manager->initWithOptions([mutableOptions copy]);
33
48
  }
@@ -27,7 +27,22 @@ RCT_REMAP_METHOD(getSDKVersion,
27
27
  RCT_EXPORT_METHOD(initWithOptions:(NSDictionary*)options)
28
28
  {
29
29
  NSMutableDictionary* mutableOptions = [options mutableCopy];
30
- mutableOptions[@"allowd"] = options[@"debug"];
30
+
31
+ // 1. 判断 debug 是否为空(nil 或 NSNull)
32
+ id debugValue = options[@"debug"];
33
+ if (debugValue && debugValue != [NSNull null]) {
34
+ mutableOptions[@"allowd"] = debugValue; // 原逻辑保留
35
+ } else {
36
+ // debug 为空时,可能设置默认值或不设置
37
+ mutableOptions[@"allowd"] = @(NO); // 示例默认 false
38
+ }
39
+
40
+ // 2. 增加 dataCenter 赋值给 country
41
+ id dataCenter = options[@"dataCenter"];
42
+ if (dataCenter && dataCenter != [NSNull null]) {
43
+ mutableOptions[@"country"] = dataCenter;
44
+ }
45
+
31
46
  TDDeviceManager_t *manager = [TDDeviceManager sharedManager];
32
47
  manager->initWithOptions([mutableOptions copy]);
33
48
  }
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "react-native-trustdevice",
3
- "version": "1.1.4",
3
+ "publishConfig": {
4
+ "access": "public"
5
+ },
6
+ "version": "1.1.5",
4
7
  "description": "React Native TrustDevice component",
5
8
  "main": "index.js",
6
9
  "react-native": "index.js",
@@ -25,9 +28,10 @@
25
28
  "index.d.ts",
26
29
  "react-native-trustdevice.podspec"
27
30
  ],
31
+
28
32
  "homepage": "https://trustdecision.com",
29
33
  "peerDependencies": {
30
34
  "react": "*",
31
35
  "react-native": "*"
32
36
  }
33
- }
37
+ }
File without changes
@@ -1,2 +0,0 @@
1
- #Tue Oct 28 10:00:11 CST 2025
2
- gradle.version=8.10
@@ -1 +0,0 @@
1
- 78098113B327001A7ADBB2DD53260281F0DC0024D59151B959C636AEF9B80944
File without changes
@@ -1,10 +0,0 @@
1
- /**
2
- * Automatically generated file. DO NOT MODIFY
3
- */
4
- package com.trustdevice;
5
-
6
- public final class BuildConfig {
7
- public static final boolean DEBUG = Boolean.parseBoolean("true");
8
- public static final String LIBRARY_PACKAGE_NAME = "com.trustdevice";
9
- public static final String BUILD_TYPE = "debug";
10
- }
@@ -1,18 +0,0 @@
1
- {
2
- "version": 3,
3
- "artifactType": {
4
- "type": "PACKAGED_MANIFESTS",
5
- "kind": "Directory"
6
- },
7
- "applicationId": "com.trustdevice",
8
- "variantName": "debug",
9
- "elements": [
10
- {
11
- "type": "SINGLE",
12
- "filters": [],
13
- "attributes": [],
14
- "outputFile": "../../merged_manifest/debug/AndroidManifest.xml"
15
- }
16
- ],
17
- "elementType": "File"
18
- }