@onekeyfe/react-native-device-utils 3.0.81 → 3.0.85

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 (61) hide show
  1. package/nitrogen/generated/android/c++/JAndroidChannel.hpp +6 -7
  2. package/nitrogen/generated/android/c++/JDualScreenInfoRect.hpp +2 -2
  3. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +3 -3
  4. package/nitrogen/generated/android/c++/JGooglePlayServicesStatus.hpp +2 -2
  5. package/nitrogen/generated/android/c++/JHybridReactNativeDeviceUtilsSpec.cpp +47 -45
  6. package/nitrogen/generated/android/c++/JHybridReactNativeDeviceUtilsSpec.hpp +20 -22
  7. package/nitrogen/generated/android/c++/JInstallerPackageName.hpp +8 -9
  8. package/nitrogen/generated/android/c++/JLaunchOptions.hpp +2 -2
  9. package/nitrogen/generated/android/c++/JUserInterfaceStyle.hpp +5 -6
  10. package/nitrogen/generated/android/c++/JWebViewPackageInfo.hpp +2 -2
  11. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/AndroidChannel.kt +3 -1
  12. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/DualScreenInfoRect.kt +2 -2
  13. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/Func_void_bool.kt +1 -1
  14. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/GooglePlayServicesStatus.kt +2 -2
  15. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/HybridReactNativeDeviceUtilsSpec.kt +16 -19
  16. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/InstallerPackageName.kt +3 -1
  17. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/LaunchOptions.kt +2 -2
  18. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/UserInterfaceStyle.kt +3 -1
  19. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/WebViewPackageInfo.kt +2 -2
  20. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/reactnativedeviceutilsOnLoad.kt +1 -1
  21. package/nitrogen/generated/android/reactnativedeviceutils+autolinking.cmake +1 -1
  22. package/nitrogen/generated/android/reactnativedeviceutils+autolinking.gradle +1 -1
  23. package/nitrogen/generated/android/reactnativedeviceutilsOnLoad.cpp +28 -18
  24. package/nitrogen/generated/android/reactnativedeviceutilsOnLoad.hpp +14 -5
  25. package/nitrogen/generated/ios/ReactNativeDeviceUtils+autolinking.rb +2 -2
  26. package/nitrogen/generated/ios/ReactNativeDeviceUtils-Swift-Cxx-Bridge.cpp +1 -1
  27. package/nitrogen/generated/ios/ReactNativeDeviceUtils-Swift-Cxx-Bridge.hpp +2 -2
  28. package/nitrogen/generated/ios/ReactNativeDeviceUtils-Swift-Cxx-Umbrella.hpp +1 -1
  29. package/nitrogen/generated/ios/ReactNativeDeviceUtilsAutolinking.mm +1 -1
  30. package/nitrogen/generated/ios/ReactNativeDeviceUtilsAutolinking.swift +9 -8
  31. package/nitrogen/generated/ios/c++/HybridReactNativeDeviceUtilsSpecSwift.cpp +1 -1
  32. package/nitrogen/generated/ios/c++/HybridReactNativeDeviceUtilsSpecSwift.hpp +7 -1
  33. package/nitrogen/generated/ios/swift/AndroidChannel.swift +1 -1
  34. package/nitrogen/generated/ios/swift/DualScreenInfoRect.swift +9 -34
  35. package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
  36. package/nitrogen/generated/ios/swift/Func_void_DualScreenInfoRect.swift +1 -2
  37. package/nitrogen/generated/ios/swift/Func_void_GooglePlayServicesStatus.swift +1 -2
  38. package/nitrogen/generated/ios/swift/Func_void_LaunchOptions.swift +1 -2
  39. package/nitrogen/generated/ios/swift/Func_void_WebViewPackageInfo.swift +1 -2
  40. package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -2
  41. package/nitrogen/generated/ios/swift/Func_void_double.swift +1 -2
  42. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
  43. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +1 -2
  44. package/nitrogen/generated/ios/swift/Func_void_std__vector_DualScreenInfoRect_.swift +1 -2
  45. package/nitrogen/generated/ios/swift/GooglePlayServicesStatus.swift +5 -18
  46. package/nitrogen/generated/ios/swift/HybridReactNativeDeviceUtilsSpec.swift +3 -4
  47. package/nitrogen/generated/ios/swift/HybridReactNativeDeviceUtilsSpec_cxx.swift +9 -2
  48. package/nitrogen/generated/ios/swift/InstallerPackageName.swift +1 -1
  49. package/nitrogen/generated/ios/swift/LaunchOptions.swift +12 -31
  50. package/nitrogen/generated/ios/swift/UserInterfaceStyle.swift +1 -1
  51. package/nitrogen/generated/ios/swift/WebViewPackageInfo.swift +7 -26
  52. package/nitrogen/generated/shared/c++/AndroidChannel.hpp +1 -1
  53. package/nitrogen/generated/shared/c++/DualScreenInfoRect.hpp +22 -14
  54. package/nitrogen/generated/shared/c++/GooglePlayServicesStatus.hpp +16 -8
  55. package/nitrogen/generated/shared/c++/HybridReactNativeDeviceUtilsSpec.cpp +1 -1
  56. package/nitrogen/generated/shared/c++/HybridReactNativeDeviceUtilsSpec.hpp +1 -1
  57. package/nitrogen/generated/shared/c++/InstallerPackageName.hpp +1 -1
  58. package/nitrogen/generated/shared/c++/LaunchOptions.hpp +16 -8
  59. package/nitrogen/generated/shared/c++/UserInterfaceStyle.hpp +1 -1
  60. package/nitrogen/generated/shared/c++/WebViewPackageInfo.hpp +19 -11
  61. package/package.json +4 -4
@@ -2,10 +2,9 @@
2
2
  /// HybridReactNativeDeviceUtilsSpec.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /// See ``HybridReactNativeDeviceUtilsSpec``
@@ -55,14 +54,14 @@ open class HybridReactNativeDeviceUtilsSpec_base {
55
54
  public init() { }
56
55
  public func getCxxWrapper() -> HybridReactNativeDeviceUtilsSpec_cxx {
57
56
  #if DEBUG
58
- guard self is HybridReactNativeDeviceUtilsSpec else {
57
+ guard self is any HybridReactNativeDeviceUtilsSpec else {
59
58
  fatalError("`self` is not a `HybridReactNativeDeviceUtilsSpec`! Did you accidentally inherit from `HybridReactNativeDeviceUtilsSpec_base` instead of `HybridReactNativeDeviceUtilsSpec`?")
60
59
  }
61
60
  #endif
62
61
  if let cxxWrapper = self.cxxWrapper {
63
62
  return cxxWrapper
64
63
  } else {
65
- let cxxWrapper = HybridReactNativeDeviceUtilsSpec_cxx(self as! HybridReactNativeDeviceUtilsSpec)
64
+ let cxxWrapper = HybridReactNativeDeviceUtilsSpec_cxx(self as! any HybridReactNativeDeviceUtilsSpec)
66
65
  self.cxxWrapper = cxxWrapper
67
66
  return cxxWrapper
68
67
  }
@@ -2,10 +2,9 @@
2
2
  /// HybridReactNativeDeviceUtilsSpec_cxx.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /**
@@ -96,6 +95,14 @@ open class HybridReactNativeDeviceUtilsSpec_cxx {
96
95
  return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
97
96
  }
98
97
 
98
+ /**
99
+ * Compares this object with the given [other] object for reference equality.
100
+ */
101
+ @inline(__always)
102
+ public func equals(other: HybridReactNativeDeviceUtilsSpec_cxx) -> Bool {
103
+ return self.__implementation === other.__implementation
104
+ }
105
+
99
106
  /**
100
107
  * Call dispose() on the Swift class.
101
108
  * This _may_ be called manually from JS.
@@ -2,7 +2,7 @@
2
2
  /// InstallerPackageName.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  /**
@@ -2,10 +2,9 @@
2
2
  /// LaunchOptions.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /**
@@ -29,38 +28,20 @@ public extension LaunchOptions {
29
28
  }())
30
29
  }
31
30
 
31
+ @inline(__always)
32
32
  var launchType: String {
33
- @inline(__always)
34
- get {
35
- return String(self.__launchType)
36
- }
37
- @inline(__always)
38
- set {
39
- self.__launchType = std.string(newValue)
40
- }
33
+ return String(self.__launchType)
41
34
  }
42
35
 
36
+ @inline(__always)
43
37
  var deepLink: String? {
44
- @inline(__always)
45
- get {
46
- return { () -> String? in
47
- if bridge.has_value_std__optional_std__string_(self.__deepLink) {
48
- let __unwrapped = bridge.get_std__optional_std__string_(self.__deepLink)
49
- return String(__unwrapped)
50
- } else {
51
- return nil
52
- }
53
- }()
54
- }
55
- @inline(__always)
56
- set {
57
- self.__deepLink = { () -> bridge.std__optional_std__string_ in
58
- if let __unwrappedValue = newValue {
59
- return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
60
- } else {
61
- return .init()
62
- }
63
- }()
64
- }
38
+ return { () -> String? in
39
+ if bridge.has_value_std__optional_std__string_(self.__deepLink) {
40
+ let __unwrapped = bridge.get_std__optional_std__string_(self.__deepLink)
41
+ return String(__unwrapped)
42
+ } else {
43
+ return nil
44
+ }
45
+ }()
65
46
  }
66
47
  }
@@ -2,7 +2,7 @@
2
2
  /// UserInterfaceStyle.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  /**
@@ -2,10 +2,9 @@
2
2
  /// WebViewPackageInfo.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /**
@@ -23,36 +22,18 @@ public extension WebViewPackageInfo {
23
22
  self.init(std.string(packageName), std.string(versionName), versionCode)
24
23
  }
25
24
 
25
+ @inline(__always)
26
26
  var packageName: String {
27
- @inline(__always)
28
- get {
29
- return String(self.__packageName)
30
- }
31
- @inline(__always)
32
- set {
33
- self.__packageName = std.string(newValue)
34
- }
27
+ return String(self.__packageName)
35
28
  }
36
29
 
30
+ @inline(__always)
37
31
  var versionName: String {
38
- @inline(__always)
39
- get {
40
- return String(self.__versionName)
41
- }
42
- @inline(__always)
43
- set {
44
- self.__versionName = std.string(newValue)
45
- }
32
+ return String(self.__versionName)
46
33
  }
47
34
 
35
+ @inline(__always)
48
36
  var versionCode: Double {
49
- @inline(__always)
50
- get {
51
- return self.__versionCode
52
- }
53
- @inline(__always)
54
- set {
55
- self.__versionCode = newValue
56
- }
37
+ return self.__versionCode
57
38
  }
58
39
  }
@@ -2,7 +2,7 @@
2
2
  /// AndroidChannel.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -2,7 +2,7 @@
2
2
  /// DualScreenInfoRect.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -22,6 +22,11 @@
22
22
  #else
23
23
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
24
  #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
25
30
 
26
31
 
27
32
 
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativedeviceutils {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (DualScreenInfoRect).
34
39
  */
35
- struct DualScreenInfoRect {
40
+ struct DualScreenInfoRect final {
36
41
  public:
37
42
  double x SWIFT_PRIVATE;
38
43
  double y SWIFT_PRIVATE;
@@ -42,6 +47,9 @@ namespace margelo::nitro::reactnativedeviceutils {
42
47
  public:
43
48
  DualScreenInfoRect() = default;
44
49
  explicit DualScreenInfoRect(double x, double y, double width, double height): x(x), y(y), width(width), height(height) {}
50
+
51
+ public:
52
+ friend bool operator==(const DualScreenInfoRect& lhs, const DualScreenInfoRect& rhs) = default;
45
53
  };
46
54
 
47
55
  } // namespace margelo::nitro::reactnativedeviceutils
@@ -54,18 +62,18 @@ namespace margelo::nitro {
54
62
  static inline margelo::nitro::reactnativedeviceutils::DualScreenInfoRect fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
55
63
  jsi::Object obj = arg.asObject(runtime);
56
64
  return margelo::nitro::reactnativedeviceutils::DualScreenInfoRect(
57
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "x")),
58
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "y")),
59
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "width")),
60
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "height"))
65
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "x"))),
66
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "y"))),
67
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "width"))),
68
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "height")))
61
69
  );
62
70
  }
63
71
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativedeviceutils::DualScreenInfoRect& arg) {
64
72
  jsi::Object obj(runtime);
65
- obj.setProperty(runtime, "x", JSIConverter<double>::toJSI(runtime, arg.x));
66
- obj.setProperty(runtime, "y", JSIConverter<double>::toJSI(runtime, arg.y));
67
- obj.setProperty(runtime, "width", JSIConverter<double>::toJSI(runtime, arg.width));
68
- obj.setProperty(runtime, "height", JSIConverter<double>::toJSI(runtime, arg.height));
73
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "x"), JSIConverter<double>::toJSI(runtime, arg.x));
74
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "y"), JSIConverter<double>::toJSI(runtime, arg.y));
75
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "width"), JSIConverter<double>::toJSI(runtime, arg.width));
76
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "height"), JSIConverter<double>::toJSI(runtime, arg.height));
69
77
  return obj;
70
78
  }
71
79
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -76,10 +84,10 @@ namespace margelo::nitro {
76
84
  if (!nitro::isPlainObject(runtime, obj)) {
77
85
  return false;
78
86
  }
79
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "x"))) return false;
80
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "y"))) return false;
81
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
82
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "height"))) return false;
87
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "x")))) return false;
88
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "y")))) return false;
89
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "width")))) return false;
90
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "height")))) return false;
83
91
  return true;
84
92
  }
85
93
  };
@@ -2,7 +2,7 @@
2
2
  /// GooglePlayServicesStatus.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -22,6 +22,11 @@
22
22
  #else
23
23
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
24
  #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
25
30
 
26
31
 
27
32
 
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativedeviceutils {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (GooglePlayServicesStatus).
34
39
  */
35
- struct GooglePlayServicesStatus {
40
+ struct GooglePlayServicesStatus final {
36
41
  public:
37
42
  double status SWIFT_PRIVATE;
38
43
  bool isAvailable SWIFT_PRIVATE;
@@ -40,6 +45,9 @@ namespace margelo::nitro::reactnativedeviceutils {
40
45
  public:
41
46
  GooglePlayServicesStatus() = default;
42
47
  explicit GooglePlayServicesStatus(double status, bool isAvailable): status(status), isAvailable(isAvailable) {}
48
+
49
+ public:
50
+ friend bool operator==(const GooglePlayServicesStatus& lhs, const GooglePlayServicesStatus& rhs) = default;
43
51
  };
44
52
 
45
53
  } // namespace margelo::nitro::reactnativedeviceutils
@@ -52,14 +60,14 @@ namespace margelo::nitro {
52
60
  static inline margelo::nitro::reactnativedeviceutils::GooglePlayServicesStatus fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
53
61
  jsi::Object obj = arg.asObject(runtime);
54
62
  return margelo::nitro::reactnativedeviceutils::GooglePlayServicesStatus(
55
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "status")),
56
- JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "isAvailable"))
63
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "status"))),
64
+ JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isAvailable")))
57
65
  );
58
66
  }
59
67
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativedeviceutils::GooglePlayServicesStatus& arg) {
60
68
  jsi::Object obj(runtime);
61
- obj.setProperty(runtime, "status", JSIConverter<double>::toJSI(runtime, arg.status));
62
- obj.setProperty(runtime, "isAvailable", JSIConverter<bool>::toJSI(runtime, arg.isAvailable));
69
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "status"), JSIConverter<double>::toJSI(runtime, arg.status));
70
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "isAvailable"), JSIConverter<bool>::toJSI(runtime, arg.isAvailable));
63
71
  return obj;
64
72
  }
65
73
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -70,8 +78,8 @@ namespace margelo::nitro {
70
78
  if (!nitro::isPlainObject(runtime, obj)) {
71
79
  return false;
72
80
  }
73
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "status"))) return false;
74
- if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "isAvailable"))) return false;
81
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "status")))) return false;
82
+ if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isAvailable")))) return false;
75
83
  return true;
76
84
  }
77
85
  };
@@ -2,7 +2,7 @@
2
2
  /// HybridReactNativeDeviceUtilsSpec.cpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #include "HybridReactNativeDeviceUtilsSpec.hpp"
@@ -2,7 +2,7 @@
2
2
  /// HybridReactNativeDeviceUtilsSpec.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -2,7 +2,7 @@
2
2
  /// InstallerPackageName.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -2,7 +2,7 @@
2
2
  /// LaunchOptions.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -22,6 +22,11 @@
22
22
  #else
23
23
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
24
  #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
25
30
 
26
31
 
27
32
 
@@ -33,7 +38,7 @@ namespace margelo::nitro::reactnativedeviceutils {
33
38
  /**
34
39
  * A struct which can be represented as a JavaScript object (LaunchOptions).
35
40
  */
36
- struct LaunchOptions {
41
+ struct LaunchOptions final {
37
42
  public:
38
43
  std::string launchType SWIFT_PRIVATE;
39
44
  std::optional<std::string> deepLink SWIFT_PRIVATE;
@@ -41,6 +46,9 @@ namespace margelo::nitro::reactnativedeviceutils {
41
46
  public:
42
47
  LaunchOptions() = default;
43
48
  explicit LaunchOptions(std::string launchType, std::optional<std::string> deepLink): launchType(launchType), deepLink(deepLink) {}
49
+
50
+ public:
51
+ friend bool operator==(const LaunchOptions& lhs, const LaunchOptions& rhs) = default;
44
52
  };
45
53
 
46
54
  } // namespace margelo::nitro::reactnativedeviceutils
@@ -53,14 +61,14 @@ namespace margelo::nitro {
53
61
  static inline margelo::nitro::reactnativedeviceutils::LaunchOptions fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
62
  jsi::Object obj = arg.asObject(runtime);
55
63
  return margelo::nitro::reactnativedeviceutils::LaunchOptions(
56
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "launchType")),
57
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "deepLink"))
64
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "launchType"))),
65
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deepLink")))
58
66
  );
59
67
  }
60
68
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativedeviceutils::LaunchOptions& arg) {
61
69
  jsi::Object obj(runtime);
62
- obj.setProperty(runtime, "launchType", JSIConverter<std::string>::toJSI(runtime, arg.launchType));
63
- obj.setProperty(runtime, "deepLink", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.deepLink));
70
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "launchType"), JSIConverter<std::string>::toJSI(runtime, arg.launchType));
71
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "deepLink"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.deepLink));
64
72
  return obj;
65
73
  }
66
74
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -71,8 +79,8 @@ namespace margelo::nitro {
71
79
  if (!nitro::isPlainObject(runtime, obj)) {
72
80
  return false;
73
81
  }
74
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "launchType"))) return false;
75
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "deepLink"))) return false;
82
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "launchType")))) return false;
83
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deepLink")))) return false;
76
84
  return true;
77
85
  }
78
86
  };
@@ -2,7 +2,7 @@
2
2
  /// UserInterfaceStyle.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -2,7 +2,7 @@
2
2
  /// WebViewPackageInfo.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -22,6 +22,11 @@
22
22
  #else
23
23
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
24
  #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
25
30
 
26
31
 
27
32
 
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativedeviceutils {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (WebViewPackageInfo).
34
39
  */
35
- struct WebViewPackageInfo {
40
+ struct WebViewPackageInfo final {
36
41
  public:
37
42
  std::string packageName SWIFT_PRIVATE;
38
43
  std::string versionName SWIFT_PRIVATE;
@@ -41,6 +46,9 @@ namespace margelo::nitro::reactnativedeviceutils {
41
46
  public:
42
47
  WebViewPackageInfo() = default;
43
48
  explicit WebViewPackageInfo(std::string packageName, std::string versionName, double versionCode): packageName(packageName), versionName(versionName), versionCode(versionCode) {}
49
+
50
+ public:
51
+ friend bool operator==(const WebViewPackageInfo& lhs, const WebViewPackageInfo& rhs) = default;
44
52
  };
45
53
 
46
54
  } // namespace margelo::nitro::reactnativedeviceutils
@@ -53,16 +61,16 @@ namespace margelo::nitro {
53
61
  static inline margelo::nitro::reactnativedeviceutils::WebViewPackageInfo fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
62
  jsi::Object obj = arg.asObject(runtime);
55
63
  return margelo::nitro::reactnativedeviceutils::WebViewPackageInfo(
56
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "packageName")),
57
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "versionName")),
58
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "versionCode"))
64
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "packageName"))),
65
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "versionName"))),
66
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "versionCode")))
59
67
  );
60
68
  }
61
69
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativedeviceutils::WebViewPackageInfo& arg) {
62
70
  jsi::Object obj(runtime);
63
- obj.setProperty(runtime, "packageName", JSIConverter<std::string>::toJSI(runtime, arg.packageName));
64
- obj.setProperty(runtime, "versionName", JSIConverter<std::string>::toJSI(runtime, arg.versionName));
65
- obj.setProperty(runtime, "versionCode", JSIConverter<double>::toJSI(runtime, arg.versionCode));
71
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "packageName"), JSIConverter<std::string>::toJSI(runtime, arg.packageName));
72
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "versionName"), JSIConverter<std::string>::toJSI(runtime, arg.versionName));
73
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "versionCode"), JSIConverter<double>::toJSI(runtime, arg.versionCode));
66
74
  return obj;
67
75
  }
68
76
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -73,9 +81,9 @@ namespace margelo::nitro {
73
81
  if (!nitro::isPlainObject(runtime, obj)) {
74
82
  return false;
75
83
  }
76
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "packageName"))) return false;
77
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "versionName"))) return false;
78
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "versionCode"))) return false;
84
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "packageName")))) return false;
85
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "versionName")))) return false;
86
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "versionCode")))) return false;
79
87
  return true;
80
88
  }
81
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-device-utils",
3
- "version": "3.0.81",
3
+ "version": "3.0.85",
4
4
  "description": "react-native-device-utils",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -78,12 +78,12 @@
78
78
  "eslint-plugin-prettier": "^5.5.4",
79
79
  "jest": "^29.7.0",
80
80
  "lefthook": "^2.0.3",
81
- "nitrogen": "0.31.10",
81
+ "nitrogen": "0.35.2",
82
82
  "prettier": "^2.8.8",
83
83
  "react": "19.2.0",
84
84
  "react-native": "patch:react-native@npm%3A0.83.0#~/.yarn/patches/react-native-npm-0.83.0-577d0f2d83.patch",
85
85
  "react-native-builder-bob": "^0.40.13",
86
- "react-native-nitro-modules": "0.33.2",
86
+ "react-native-nitro-modules": "0.35.2",
87
87
  "release-it": "^19.0.4",
88
88
  "turbo": "^2.5.6",
89
89
  "typescript": "^5.9.2"
@@ -91,7 +91,7 @@
91
91
  "peerDependencies": {
92
92
  "react": "*",
93
93
  "react-native": "*",
94
- "react-native-nitro-modules": "0.33.2"
94
+ "react-native-nitro-modules": "0.35.2"
95
95
  },
96
96
  "react-native-builder-bob": {
97
97
  "source": "src",