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

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,7 +2,7 @@
2
2
  /// HybridReactNativeDeviceUtilsSpec.kt
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
  package com.margelo.nitro.reactnativedeviceutils
@@ -25,23 +25,6 @@ import com.margelo.nitro.core.HybridObject
25
25
  "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
26
26
  )
27
27
  abstract class HybridReactNativeDeviceUtilsSpec: HybridObject() {
28
- @DoNotStrip
29
- private var mHybridData: HybridData = initHybrid()
30
-
31
- init {
32
- super.updateNative(mHybridData)
33
- }
34
-
35
- override fun updateNative(hybridData: HybridData) {
36
- mHybridData = hybridData
37
- super.updateNative(hybridData)
38
- }
39
-
40
- // Default implementation of `HybridObject.toString()`
41
- override fun toString(): String {
42
- return "[HybridObject ReactNativeDeviceUtils]"
43
- }
44
-
45
28
  // Properties
46
29
 
47
30
 
@@ -155,7 +138,21 @@ abstract class HybridReactNativeDeviceUtilsSpec: HybridObject() {
155
138
  @Keep
156
139
  abstract fun getInstallerPackageName(): InstallerPackageName
157
140
 
158
- private external fun initHybrid(): HybridData
141
+ // Default implementation of `HybridObject.toString()`
142
+ override fun toString(): String {
143
+ return "[HybridObject ReactNativeDeviceUtils]"
144
+ }
145
+
146
+ // C++ backing class
147
+ @DoNotStrip
148
+ @Keep
149
+ protected open class CxxPart(javaPart: HybridReactNativeDeviceUtilsSpec): HybridObject.CxxPart(javaPart) {
150
+ // C++ JHybridReactNativeDeviceUtilsSpec::CxxPart::initHybrid(...)
151
+ external override fun initHybrid(): HybridData
152
+ }
153
+ override fun createCxxPart(): CxxPart {
154
+ return CxxPart(this)
155
+ }
159
156
 
160
157
  companion object {
161
158
  protected const val TAG = "HybridReactNativeDeviceUtilsSpec"
@@ -2,7 +2,7 @@
2
2
  /// InstallerPackageName.kt
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
  package com.margelo.nitro.reactnativedeviceutils
@@ -22,4 +22,6 @@ enum class InstallerPackageName(@DoNotStrip @Keep val value: Int) {
22
22
  OTHER(3),
23
23
  PLAYSTORE(4),
24
24
  HUAWEIAPPGALLERY(5);
25
+
26
+ companion object
25
27
  }
@@ -2,7 +2,7 @@
2
2
  /// LaunchOptions.kt
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
  package com.margelo.nitro.reactnativedeviceutils
@@ -26,7 +26,7 @@ data class LaunchOptions(
26
26
  ) {
27
27
  /* primary constructor */
28
28
 
29
- private companion object {
29
+ companion object {
30
30
  /**
31
31
  * Constructor called from C++
32
32
  */
@@ -2,7 +2,7 @@
2
2
  /// UserInterfaceStyle.kt
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
  package com.margelo.nitro.reactnativedeviceutils
@@ -19,4 +19,6 @@ enum class UserInterfaceStyle(@DoNotStrip @Keep val value: Int) {
19
19
  LIGHT(0),
20
20
  DARK(1),
21
21
  UNSPECIFIED(2);
22
+
23
+ companion object
22
24
  }
@@ -2,7 +2,7 @@
2
2
  /// WebViewPackageInfo.kt
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
  package com.margelo.nitro.reactnativedeviceutils
@@ -29,7 +29,7 @@ data class WebViewPackageInfo(
29
29
  ) {
30
30
  /* primary constructor */
31
31
 
32
- private companion object {
32
+ companion object {
33
33
  /**
34
34
  * Constructor called from C++
35
35
  */
@@ -2,7 +2,7 @@
2
2
  /// reactnativedeviceutilsOnLoad.kt
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
  package com.margelo.nitro.reactnativedeviceutils
@@ -2,7 +2,7 @@
2
2
  # reactnativedeviceutils+autolinking.cmake
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
  # This is a CMake file that adds all files generated by Nitrogen
@@ -2,7 +2,7 @@
2
2
  /// reactnativedeviceutils+autolinking.gradle
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
  /// This is a Gradle file that adds all files generated by Nitrogen
@@ -2,7 +2,7 @@
2
2
  /// reactnativedeviceutilsOnLoad.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
  #ifndef BUILDING_REACTNATIVEDEVICEUTILS_WITH_GENERATED_CMAKE_PROJECT
@@ -22,25 +22,35 @@
22
22
  namespace margelo::nitro::reactnativedeviceutils {
23
23
 
24
24
  int initialize(JavaVM* vm) {
25
+ return facebook::jni::initialize(vm, []() {
26
+ ::margelo::nitro::reactnativedeviceutils::registerAllNatives();
27
+ });
28
+ }
29
+
30
+ struct JHybridReactNativeDeviceUtilsSpecImpl: public jni::JavaClass<JHybridReactNativeDeviceUtilsSpecImpl, JHybridReactNativeDeviceUtilsSpec::JavaPart> {
31
+ static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/reactnativedeviceutils/ReactNativeDeviceUtils;";
32
+ static std::shared_ptr<JHybridReactNativeDeviceUtilsSpec> create() {
33
+ static const auto constructorFn = javaClassStatic()->getConstructor<JHybridReactNativeDeviceUtilsSpecImpl::javaobject()>();
34
+ jni::local_ref<JHybridReactNativeDeviceUtilsSpec::JavaPart> javaPart = javaClassStatic()->newObject(constructorFn);
35
+ return javaPart->getJHybridReactNativeDeviceUtilsSpec();
36
+ }
37
+ };
38
+
39
+ void registerAllNatives() {
25
40
  using namespace margelo::nitro;
26
41
  using namespace margelo::nitro::reactnativedeviceutils;
27
- using namespace facebook;
28
-
29
- return facebook::jni::initialize(vm, [] {
30
- // Register native JNI methods
31
- margelo::nitro::reactnativedeviceutils::JHybridReactNativeDeviceUtilsSpec::registerNatives();
32
- margelo::nitro::reactnativedeviceutils::JFunc_void_bool_cxx::registerNatives();
33
-
34
- // Register Nitro Hybrid Objects
35
- HybridObjectRegistry::registerHybridObjectConstructor(
36
- "ReactNativeDeviceUtils",
37
- []() -> std::shared_ptr<HybridObject> {
38
- static DefaultConstructableObject<JHybridReactNativeDeviceUtilsSpec::javaobject> object("com/margelo/nitro/reactnativedeviceutils/ReactNativeDeviceUtils");
39
- auto instance = object.create();
40
- return instance->cthis()->shared();
41
- }
42
- );
43
- });
42
+
43
+ // Register native JNI methods
44
+ margelo::nitro::reactnativedeviceutils::JHybridReactNativeDeviceUtilsSpec::CxxPart::registerNatives();
45
+ margelo::nitro::reactnativedeviceutils::JFunc_void_bool_cxx::registerNatives();
46
+
47
+ // Register Nitro Hybrid Objects
48
+ HybridObjectRegistry::registerHybridObjectConstructor(
49
+ "ReactNativeDeviceUtils",
50
+ []() -> std::shared_ptr<HybridObject> {
51
+ return JHybridReactNativeDeviceUtilsSpecImpl::create();
52
+ }
53
+ );
44
54
  }
45
55
 
46
56
  } // namespace margelo::nitro::reactnativedeviceutils
@@ -2,24 +2,33 @@
2
2
  /// reactnativedeviceutilsOnLoad.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
  #include <jni.h>
9
+ #include <functional>
9
10
  #include <NitroModules/NitroDefines.hpp>
10
11
 
11
12
  namespace margelo::nitro::reactnativedeviceutils {
12
13
 
14
+ [[deprecated("Use registerNatives() instead.")]]
15
+ int initialize(JavaVM* vm);
16
+
13
17
  /**
14
- * Initializes the native (C++) part of reactnativedeviceutils, and autolinks all Hybrid Objects.
15
- * Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`).
18
+ * Register the native (C++) part of reactnativedeviceutils, and autolinks all Hybrid Objects.
19
+ * Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`),
20
+ * inside a `facebook::jni::initialize(vm, ...)` call.
16
21
  * Example:
17
22
  * ```cpp (cpp-adapter.cpp)
18
23
  * JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
19
- * return margelo::nitro::reactnativedeviceutils::initialize(vm);
24
+ * return facebook::jni::initialize(vm, []() {
25
+ * // register all reactnativedeviceutils HybridObjects
26
+ * margelo::nitro::reactnativedeviceutils::registerNatives();
27
+ * // any other custom registrations go here.
28
+ * });
20
29
  * }
21
30
  * ```
22
31
  */
23
- int initialize(JavaVM* vm);
32
+ void registerAllNatives();
24
33
 
25
34
  } // namespace margelo::nitro::reactnativedeviceutils
@@ -2,7 +2,7 @@
2
2
  # ReactNativeDeviceUtils+autolinking.rb
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
  # This is a Ruby script that adds all files generated by Nitrogen
@@ -52,7 +52,7 @@ def add_nitrogen_files(spec)
52
52
  spec.pod_target_xcconfig = current_pod_target_xcconfig.merge({
53
53
  # Use C++ 20
54
54
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
55
- # Enables C++ <-> Swift interop (by default it's only C)
55
+ # Enables C++ <-> Swift interop (by default it's only ObjC)
56
56
  "SWIFT_OBJC_INTEROP_MODE" => "objcxx",
57
57
  # Enables stricter modular headers
58
58
  "DEFINES_MODULE" => "YES",
@@ -2,7 +2,7 @@
2
2
  /// ReactNativeDeviceUtils-Swift-Cxx-Bridge.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 "ReactNativeDeviceUtils-Swift-Cxx-Bridge.hpp"
@@ -2,7 +2,7 @@
2
2
  /// ReactNativeDeviceUtils-Swift-Cxx-Bridge.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
@@ -186,7 +186,7 @@ namespace margelo::nitro::reactnativedeviceutils::bridge::swift {
186
186
  return optional.has_value();
187
187
  }
188
188
  inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
189
- return *optional;
189
+ return optional.value();
190
190
  }
191
191
 
192
192
  // pragma MARK: std::shared_ptr<Promise<LaunchOptions>>
@@ -2,7 +2,7 @@
2
2
  /// ReactNativeDeviceUtils-Swift-Cxx-Umbrella.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
  /// ReactNativeDeviceUtilsAutolinking.mm
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
  #import <Foundation/Foundation.h>
@@ -2,19 +2,16 @@
2
2
  /// ReactNativeDeviceUtilsAutolinking.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 NitroModules
9
+
10
+ // TODO: Use empty enums once Swift supports exporting them as namespaces
11
+ // See: https://github.com/swiftlang/swift/pull/83616
8
12
  public final class ReactNativeDeviceUtilsAutolinking {
9
13
  public typealias bridge = margelo.nitro.reactnativedeviceutils.bridge.swift
10
14
 
11
- /**
12
- * Creates an instance of a Swift class that implements `HybridReactNativeDeviceUtilsSpec`,
13
- * and wraps it in a Swift class that can directly interop with C++ (`HybridReactNativeDeviceUtilsSpec_cxx`)
14
- *
15
- * This is generated by Nitrogen and will initialize the class specified
16
- * in the `"autolinking"` property of `nitro.json` (in this case, `ReactNativeDeviceUtils`).
17
- */
18
15
  public static func createReactNativeDeviceUtils() -> bridge.std__shared_ptr_HybridReactNativeDeviceUtilsSpec_ {
19
16
  let hybridObject = ReactNativeDeviceUtils()
20
17
  return { () -> bridge.std__shared_ptr_HybridReactNativeDeviceUtilsSpec_ in
@@ -22,4 +19,8 @@ public final class ReactNativeDeviceUtilsAutolinking {
22
19
  return __cxxWrapped.getCxxPart()
23
20
  }()
24
21
  }
22
+
23
+ public static func isReactNativeDeviceUtilsRecyclable() -> Bool {
24
+ return ReactNativeDeviceUtils.self is any RecyclableView.Type
25
+ }
25
26
  }
@@ -2,7 +2,7 @@
2
2
  /// HybridReactNativeDeviceUtilsSpecSwift.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 "HybridReactNativeDeviceUtilsSpecSwift.hpp"
@@ -2,7 +2,7 @@
2
2
  /// HybridReactNativeDeviceUtilsSpecSwift.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
@@ -71,6 +71,12 @@ namespace margelo::nitro::reactnativedeviceutils {
71
71
  inline size_t getExternalMemorySize() noexcept override {
72
72
  return _swiftPart.getMemorySize();
73
73
  }
74
+ bool equals(const std::shared_ptr<HybridObject>& other) override {
75
+ if (auto otherCast = std::dynamic_pointer_cast<HybridReactNativeDeviceUtilsSpecSwift>(other)) {
76
+ return _swiftPart.equals(otherCast->_swiftPart);
77
+ }
78
+ return false;
79
+ }
74
80
  void dispose() noexcept override {
75
81
  _swiftPart.dispose();
76
82
  }
@@ -2,7 +2,7 @@
2
2
  /// AndroidChannel.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
  /// DualScreenInfoRect.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,47 +22,23 @@ public extension DualScreenInfoRect {
23
22
  self.init(x, y, width, height)
24
23
  }
25
24
 
25
+ @inline(__always)
26
26
  var x: Double {
27
- @inline(__always)
28
- get {
29
- return self.__x
30
- }
31
- @inline(__always)
32
- set {
33
- self.__x = newValue
34
- }
27
+ return self.__x
35
28
  }
36
29
 
30
+ @inline(__always)
37
31
  var y: Double {
38
- @inline(__always)
39
- get {
40
- return self.__y
41
- }
42
- @inline(__always)
43
- set {
44
- self.__y = newValue
45
- }
32
+ return self.__y
46
33
  }
47
34
 
35
+ @inline(__always)
48
36
  var width: Double {
49
- @inline(__always)
50
- get {
51
- return self.__width
52
- }
53
- @inline(__always)
54
- set {
55
- self.__width = newValue
56
- }
37
+ return self.__width
57
38
  }
58
39
 
40
+ @inline(__always)
59
41
  var height: Double {
60
- @inline(__always)
61
- get {
62
- return self.__height
63
- }
64
- @inline(__always)
65
- set {
66
- self.__height = newValue
67
- }
42
+ return self.__height
68
43
  }
69
44
  }
@@ -2,10 +2,9 @@
2
2
  /// Func_void.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
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_DualScreenInfoRect.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
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_GooglePlayServicesStatus.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
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_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
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_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
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_bool.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
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_double.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
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_std__exception_ptr.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
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_std__string.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
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_std__vector_DualScreenInfoRect_.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
  /**
@@ -2,10 +2,9 @@
2
2
  /// GooglePlayServicesStatus.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,25 +22,13 @@ public extension GooglePlayServicesStatus {
23
22
  self.init(status, isAvailable)
24
23
  }
25
24
 
25
+ @inline(__always)
26
26
  var status: Double {
27
- @inline(__always)
28
- get {
29
- return self.__status
30
- }
31
- @inline(__always)
32
- set {
33
- self.__status = newValue
34
- }
27
+ return self.__status
35
28
  }
36
29
 
30
+ @inline(__always)
37
31
  var isAvailable: Bool {
38
- @inline(__always)
39
- get {
40
- return self.__isAvailable
41
- }
42
- @inline(__always)
43
- set {
44
- self.__isAvailable = newValue
45
- }
32
+ return self.__isAvailable
46
33
  }
47
34
  }