@onekeyfe/react-native-check-biometric-auth-changed 0.1.2

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 (47) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +39 -0
  3. package/ReactNativeCheckBiometricAuthChanged.podspec +29 -0
  4. package/android/CMakeLists.txt +24 -0
  5. package/android/build.gradle +128 -0
  6. package/android/gradle.properties +5 -0
  7. package/android/src/main/AndroidManifest.xml +2 -0
  8. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  9. package/android/src/main/java/com/margelo/nitro/onekeyfe/reactnativecheckbiometricauthchanged/ReactNativeCheckBiometricAuthChanged.kt +12 -0
  10. package/android/src/main/java/com/margelo/nitro/onekeyfe/reactnativecheckbiometricauthchanged/ReactNativeCheckBiometricAuthChangedPackage.kt +22 -0
  11. package/ios/ReactNativeCheckBiometricAuthChanged.swift +22 -0
  12. package/lib/module/ReactNativeCheckBiometricAuthChanged.nitro.js +4 -0
  13. package/lib/module/ReactNativeCheckBiometricAuthChanged.nitro.js.map +1 -0
  14. package/lib/module/index.js +8 -0
  15. package/lib/module/index.js.map +1 -0
  16. package/lib/module/package.json +1 -0
  17. package/lib/typescript/package.json +1 -0
  18. package/lib/typescript/src/ReactNativeCheckBiometricAuthChanged.nitro.d.ts +8 -0
  19. package/lib/typescript/src/ReactNativeCheckBiometricAuthChanged.nitro.d.ts.map +1 -0
  20. package/lib/typescript/src/index.d.ts +2 -0
  21. package/lib/typescript/src/index.d.ts.map +1 -0
  22. package/nitro.json +17 -0
  23. package/nitrogen/generated/android/c++/JHybridReactNativeCheckBiometricAuthChangedSpec.cpp +64 -0
  24. package/nitrogen/generated/android/c++/JHybridReactNativeCheckBiometricAuthChangedSpec.hpp +65 -0
  25. package/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyfe/reactnativecheckbiometricauthchanged/HybridReactNativeCheckBiometricAuthChangedSpec.kt +58 -0
  26. package/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyfe/reactnativecheckbiometricauthchanged/onekeyfe_reactnativecheckbiometricauthchangedOnLoad.kt +35 -0
  27. package/nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchanged+autolinking.cmake +81 -0
  28. package/nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchanged+autolinking.gradle +27 -0
  29. package/nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchangedOnLoad.cpp +44 -0
  30. package/nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchangedOnLoad.hpp +25 -0
  31. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged+autolinking.rb +60 -0
  32. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Bridge.cpp +49 -0
  33. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Bridge.hpp +110 -0
  34. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Umbrella.hpp +44 -0
  35. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChangedAutolinking.mm +33 -0
  36. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChangedAutolinking.swift +25 -0
  37. package/nitrogen/generated/ios/c++/HybridReactNativeCheckBiometricAuthChangedSpecSwift.cpp +11 -0
  38. package/nitrogen/generated/ios/c++/HybridReactNativeCheckBiometricAuthChangedSpecSwift.hpp +76 -0
  39. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  40. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  41. package/nitrogen/generated/ios/swift/HybridReactNativeCheckBiometricAuthChangedSpec.swift +56 -0
  42. package/nitrogen/generated/ios/swift/HybridReactNativeCheckBiometricAuthChangedSpec_cxx.swift +138 -0
  43. package/nitrogen/generated/shared/c++/HybridReactNativeCheckBiometricAuthChangedSpec.cpp +21 -0
  44. package/nitrogen/generated/shared/c++/HybridReactNativeCheckBiometricAuthChangedSpec.hpp +62 -0
  45. package/package.json +173 -0
  46. package/src/ReactNativeCheckBiometricAuthChanged.nitro.ts +6 -0
  47. package/src/index.tsx +11 -0
@@ -0,0 +1,81 @@
1
+ #
2
+ # onekeyfe_reactnativecheckbiometricauthchanged+autolinking.cmake
3
+ # This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ # https://github.com/mrousavy/nitro
5
+ # Copyright © 2025 Marc Rousavy @ Margelo
6
+ #
7
+
8
+ # This is a CMake file that adds all files generated by Nitrogen
9
+ # to the current CMake project.
10
+ #
11
+ # To use it, add this to your CMakeLists.txt:
12
+ # ```cmake
13
+ # include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchanged+autolinking.cmake)
14
+ # ```
15
+
16
+ # Define a flag to check if we are building properly
17
+ add_definitions(-DBUILDING_ONEKEYFEREACTNATIVECHECKBIOMETRICAUTHCHANGED_WITH_GENERATED_CMAKE_PROJECT)
18
+
19
+ # Enable Raw Props parsing in react-native (for Nitro Views)
20
+ add_definitions(-DRN_SERIALIZABLE_STATE)
21
+
22
+ # Add all headers that were generated by Nitrogen
23
+ include_directories(
24
+ "../nitrogen/generated/shared/c++"
25
+ "../nitrogen/generated/android/c++"
26
+ "../nitrogen/generated/android/"
27
+ )
28
+
29
+ # Add all .cpp sources that were generated by Nitrogen
30
+ target_sources(
31
+ # CMake project name (Android C++ library name)
32
+ onekeyfe_reactnativecheckbiometricauthchanged PRIVATE
33
+ # Autolinking Setup
34
+ ../nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchangedOnLoad.cpp
35
+ # Shared Nitrogen C++ sources
36
+ ../nitrogen/generated/shared/c++/HybridReactNativeCheckBiometricAuthChangedSpec.cpp
37
+ # Android-specific Nitrogen C++ sources
38
+ ../nitrogen/generated/android/c++/JHybridReactNativeCheckBiometricAuthChangedSpec.cpp
39
+ )
40
+
41
+ # From node_modules/react-native/ReactAndroid/cmake-utils/folly-flags.cmake
42
+ # Used in node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake
43
+ target_compile_definitions(
44
+ onekeyfe_reactnativecheckbiometricauthchanged PRIVATE
45
+ -DFOLLY_NO_CONFIG=1
46
+ -DFOLLY_HAVE_CLOCK_GETTIME=1
47
+ -DFOLLY_USE_LIBCPP=1
48
+ -DFOLLY_CFG_NO_COROUTINES=1
49
+ -DFOLLY_MOBILE=1
50
+ -DFOLLY_HAVE_RECVMMSG=1
51
+ -DFOLLY_HAVE_PTHREAD=1
52
+ # Once we target android-23 above, we can comment
53
+ # the following line. NDK uses GNU style stderror_r() after API 23.
54
+ -DFOLLY_HAVE_XSI_STRERROR_R=1
55
+ )
56
+
57
+ # Add all libraries required by the generated specs
58
+ find_package(fbjni REQUIRED) # <-- Used for communication between Java <-> C++
59
+ find_package(ReactAndroid REQUIRED) # <-- Used to set up React Native bindings (e.g. CallInvoker/TurboModule)
60
+ find_package(react-native-nitro-modules REQUIRED) # <-- Used to create all HybridObjects and use the Nitro core library
61
+
62
+ # Link all libraries together
63
+ target_link_libraries(
64
+ onekeyfe_reactnativecheckbiometricauthchanged
65
+ fbjni::fbjni # <-- Facebook C++ JNI helpers
66
+ ReactAndroid::jsi # <-- RN: JSI
67
+ react-native-nitro-modules::NitroModules # <-- NitroModules Core :)
68
+ )
69
+
70
+ # Link react-native (different prefab between RN 0.75 and RN 0.76)
71
+ if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
72
+ target_link_libraries(
73
+ onekeyfe_reactnativecheckbiometricauthchanged
74
+ ReactAndroid::reactnative # <-- RN: Native Modules umbrella prefab
75
+ )
76
+ else()
77
+ target_link_libraries(
78
+ onekeyfe_reactnativecheckbiometricauthchanged
79
+ ReactAndroid::react_nativemodule_core # <-- RN: TurboModules Core
80
+ )
81
+ endif()
@@ -0,0 +1,27 @@
1
+ ///
2
+ /// onekeyfe_reactnativecheckbiometricauthchanged+autolinking.gradle
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ /// This is a Gradle file that adds all files generated by Nitrogen
9
+ /// to the current Gradle project.
10
+ ///
11
+ /// To use it, add this to your build.gradle:
12
+ /// ```gradle
13
+ /// apply from: '../nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchanged+autolinking.gradle'
14
+ /// ```
15
+
16
+ logger.warn("[NitroModules] 🔥 onekeyfe_reactnativecheckbiometricauthchanged is boosted by nitro!")
17
+
18
+ android {
19
+ sourceSets {
20
+ main {
21
+ java.srcDirs += [
22
+ // Nitrogen files
23
+ "${project.projectDir}/../nitrogen/generated/android/kotlin"
24
+ ]
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,44 @@
1
+ ///
2
+ /// onekeyfe_reactnativecheckbiometricauthchangedOnLoad.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #ifndef BUILDING_ONEKEYFEREACTNATIVECHECKBIOMETRICAUTHCHANGED_WITH_GENERATED_CMAKE_PROJECT
9
+ #error onekeyfe_reactnativecheckbiometricauthchangedOnLoad.cpp is not being built with the autogenerated CMakeLists.txt project. Is a different CMakeLists.txt building this?
10
+ #endif
11
+
12
+ #include "onekeyfe_reactnativecheckbiometricauthchangedOnLoad.hpp"
13
+
14
+ #include <jni.h>
15
+ #include <fbjni/fbjni.h>
16
+ #include <NitroModules/HybridObjectRegistry.hpp>
17
+
18
+ #include "JHybridReactNativeCheckBiometricAuthChangedSpec.hpp"
19
+ #include <NitroModules/DefaultConstructableObject.hpp>
20
+
21
+ namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged {
22
+
23
+ int initialize(JavaVM* vm) {
24
+ using namespace margelo::nitro;
25
+ using namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged;
26
+ using namespace facebook;
27
+
28
+ return facebook::jni::initialize(vm, [] {
29
+ // Register native JNI methods
30
+ margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged::JHybridReactNativeCheckBiometricAuthChangedSpec::registerNatives();
31
+
32
+ // Register Nitro Hybrid Objects
33
+ HybridObjectRegistry::registerHybridObjectConstructor(
34
+ "ReactNativeCheckBiometricAuthChanged",
35
+ []() -> std::shared_ptr<HybridObject> {
36
+ static DefaultConstructableObject<JHybridReactNativeCheckBiometricAuthChangedSpec::javaobject> object("com/margelo/nitro/onekeyfe/reactnativecheckbiometricauthchanged/ReactNativeCheckBiometricAuthChanged");
37
+ auto instance = object.create();
38
+ return instance->cthis()->shared();
39
+ }
40
+ );
41
+ });
42
+ }
43
+
44
+ } // namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged
@@ -0,0 +1,25 @@
1
+ ///
2
+ /// onekeyfe_reactnativecheckbiometricauthchangedOnLoad.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include <jni.h>
9
+ #include <NitroModules/NitroDefines.hpp>
10
+
11
+ namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged {
12
+
13
+ /**
14
+ * Initializes the native (C++) part of onekeyfe_reactnativecheckbiometricauthchanged, and autolinks all Hybrid Objects.
15
+ * Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`).
16
+ * Example:
17
+ * ```cpp (cpp-adapter.cpp)
18
+ * JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
19
+ * return margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged::initialize(vm);
20
+ * }
21
+ * ```
22
+ */
23
+ int initialize(JavaVM* vm);
24
+
25
+ } // namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged
@@ -0,0 +1,60 @@
1
+ #
2
+ # ReactNativeCheckBiometricAuthChanged+autolinking.rb
3
+ # This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ # https://github.com/mrousavy/nitro
5
+ # Copyright © 2025 Marc Rousavy @ Margelo
6
+ #
7
+
8
+ # This is a Ruby script that adds all files generated by Nitrogen
9
+ # to the given podspec.
10
+ #
11
+ # To use it, add this to your .podspec:
12
+ # ```ruby
13
+ # Pod::Spec.new do |spec|
14
+ # # ...
15
+ #
16
+ # # Add all files generated by Nitrogen
17
+ # load 'nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged+autolinking.rb'
18
+ # add_nitrogen_files(spec)
19
+ # end
20
+ # ```
21
+
22
+ def add_nitrogen_files(spec)
23
+ Pod::UI.puts "[NitroModules] 🔥 ReactNativeCheckBiometricAuthChanged is boosted by nitro!"
24
+
25
+ spec.dependency "NitroModules"
26
+
27
+ current_source_files = Array(spec.attributes_hash['source_files'])
28
+ spec.source_files = current_source_files + [
29
+ # Generated cross-platform specs
30
+ "nitrogen/generated/shared/**/*.{h,hpp,c,cpp,swift}",
31
+ # Generated bridges for the cross-platform specs
32
+ "nitrogen/generated/ios/**/*.{h,hpp,c,cpp,mm,swift}",
33
+ ]
34
+
35
+ current_public_header_files = Array(spec.attributes_hash['public_header_files'])
36
+ spec.public_header_files = current_public_header_files + [
37
+ # Generated specs
38
+ "nitrogen/generated/shared/**/*.{h,hpp}",
39
+ # Swift to C++ bridging helpers
40
+ "nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Bridge.hpp"
41
+ ]
42
+
43
+ current_private_header_files = Array(spec.attributes_hash['private_header_files'])
44
+ spec.private_header_files = current_private_header_files + [
45
+ # iOS specific specs
46
+ "nitrogen/generated/ios/c++/**/*.{h,hpp}",
47
+ # Views are framework-specific and should be private
48
+ "nitrogen/generated/shared/**/views/**/*"
49
+ ]
50
+
51
+ current_pod_target_xcconfig = spec.attributes_hash['pod_target_xcconfig'] || {}
52
+ spec.pod_target_xcconfig = current_pod_target_xcconfig.merge({
53
+ # Use C++ 20
54
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
55
+ # Enables C++ <-> Swift interop (by default it's only C)
56
+ "SWIFT_OBJC_INTEROP_MODE" => "objcxx",
57
+ # Enables stricter modular headers
58
+ "DEFINES_MODULE" => "YES",
59
+ })
60
+ end
@@ -0,0 +1,49 @@
1
+ ///
2
+ /// ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Bridge.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include "ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Bridge.hpp"
9
+
10
+ // Include C++ implementation defined types
11
+ #include "HybridReactNativeCheckBiometricAuthChangedSpecSwift.hpp"
12
+ #include "ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Umbrella.hpp"
13
+ #include <NitroModules/NitroDefines.hpp>
14
+
15
+ namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged::bridge::swift {
16
+
17
+ // pragma MARK: std::function<void(bool /* result */)>
18
+ Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
19
+ auto swiftClosure = ReactNativeCheckBiometricAuthChanged::Func_void_bool::fromUnsafe(swiftClosureWrapper);
20
+ return [swiftClosure = std::move(swiftClosure)](bool result) mutable -> void {
21
+ swiftClosure.call(result);
22
+ };
23
+ }
24
+
25
+ // pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
26
+ Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
27
+ auto swiftClosure = ReactNativeCheckBiometricAuthChanged::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
28
+ return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
29
+ swiftClosure.call(error);
30
+ };
31
+ }
32
+
33
+ // pragma MARK: std::shared_ptr<HybridReactNativeCheckBiometricAuthChangedSpec>
34
+ std::shared_ptr<HybridReactNativeCheckBiometricAuthChangedSpec> create_std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
35
+ ReactNativeCheckBiometricAuthChanged::HybridReactNativeCheckBiometricAuthChangedSpec_cxx swiftPart = ReactNativeCheckBiometricAuthChanged::HybridReactNativeCheckBiometricAuthChangedSpec_cxx::fromUnsafe(swiftUnsafePointer);
36
+ return std::make_shared<margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged::HybridReactNativeCheckBiometricAuthChangedSpecSwift>(swiftPart);
37
+ }
38
+ void* NON_NULL get_std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_(std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_ cppType) {
39
+ std::shared_ptr<margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged::HybridReactNativeCheckBiometricAuthChangedSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged::HybridReactNativeCheckBiometricAuthChangedSpecSwift>(cppType);
40
+ #ifdef NITRO_DEBUG
41
+ if (swiftWrapper == nullptr) [[unlikely]] {
42
+ throw std::runtime_error("Class \"HybridReactNativeCheckBiometricAuthChangedSpec\" is not implemented in Swift!");
43
+ }
44
+ #endif
45
+ ReactNativeCheckBiometricAuthChanged::HybridReactNativeCheckBiometricAuthChangedSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
46
+ return swiftPart.toUnsafe();
47
+ }
48
+
49
+ } // namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged::bridge::swift
@@ -0,0 +1,110 @@
1
+ ///
2
+ /// ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Bridge.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ // Forward declarations of C++ defined types
11
+ // Forward declaration of `HybridReactNativeCheckBiometricAuthChangedSpec` to properly resolve imports.
12
+ namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged { class HybridReactNativeCheckBiometricAuthChangedSpec; }
13
+
14
+ // Forward declarations of Swift defined types
15
+ // Forward declaration of `HybridReactNativeCheckBiometricAuthChangedSpec_cxx` to properly resolve imports.
16
+ namespace ReactNativeCheckBiometricAuthChanged { class HybridReactNativeCheckBiometricAuthChangedSpec_cxx; }
17
+
18
+ // Include C++ defined types
19
+ #include "HybridReactNativeCheckBiometricAuthChangedSpec.hpp"
20
+ #include <NitroModules/Promise.hpp>
21
+ #include <NitroModules/PromiseHolder.hpp>
22
+ #include <NitroModules/Result.hpp>
23
+ #include <exception>
24
+ #include <functional>
25
+ #include <memory>
26
+
27
+ /**
28
+ * Contains specialized versions of C++ templated types so they can be accessed from Swift,
29
+ * as well as helper functions to interact with those C++ types from Swift.
30
+ */
31
+ namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged::bridge::swift {
32
+
33
+ // pragma MARK: std::shared_ptr<Promise<bool>>
34
+ /**
35
+ * Specialized version of `std::shared_ptr<Promise<bool>>`.
36
+ */
37
+ using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
38
+ inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
39
+ return Promise<bool>::create();
40
+ }
41
+ inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
42
+ return PromiseHolder<bool>(std::move(promise));
43
+ }
44
+
45
+ // pragma MARK: std::function<void(bool /* result */)>
46
+ /**
47
+ * Specialized version of `std::function<void(bool)>`.
48
+ */
49
+ using Func_void_bool = std::function<void(bool /* result */)>;
50
+ /**
51
+ * Wrapper class for a `std::function<void(bool / * result * /)>`, this can be used from Swift.
52
+ */
53
+ class Func_void_bool_Wrapper final {
54
+ public:
55
+ explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
56
+ inline void call(bool result) const noexcept {
57
+ _function->operator()(result);
58
+ }
59
+ private:
60
+ std::unique_ptr<std::function<void(bool /* result */)>> _function;
61
+ } SWIFT_NONCOPYABLE;
62
+ Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
63
+ inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
64
+ return Func_void_bool_Wrapper(std::move(value));
65
+ }
66
+
67
+ // pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
68
+ /**
69
+ * Specialized version of `std::function<void(const std::exception_ptr&)>`.
70
+ */
71
+ using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
72
+ /**
73
+ * Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
74
+ */
75
+ class Func_void_std__exception_ptr_Wrapper final {
76
+ public:
77
+ explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
78
+ inline void call(std::exception_ptr error) const noexcept {
79
+ _function->operator()(error);
80
+ }
81
+ private:
82
+ std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
83
+ } SWIFT_NONCOPYABLE;
84
+ Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
85
+ inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
86
+ return Func_void_std__exception_ptr_Wrapper(std::move(value));
87
+ }
88
+
89
+ // pragma MARK: std::shared_ptr<HybridReactNativeCheckBiometricAuthChangedSpec>
90
+ /**
91
+ * Specialized version of `std::shared_ptr<HybridReactNativeCheckBiometricAuthChangedSpec>`.
92
+ */
93
+ using std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_ = std::shared_ptr<HybridReactNativeCheckBiometricAuthChangedSpec>;
94
+ std::shared_ptr<HybridReactNativeCheckBiometricAuthChangedSpec> create_std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
95
+ void* NON_NULL get_std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_(std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_ cppType);
96
+
97
+ // pragma MARK: std::weak_ptr<HybridReactNativeCheckBiometricAuthChangedSpec>
98
+ using std__weak_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_ = std::weak_ptr<HybridReactNativeCheckBiometricAuthChangedSpec>;
99
+ inline std__weak_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_ weakify_std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_(const std::shared_ptr<HybridReactNativeCheckBiometricAuthChangedSpec>& strong) noexcept { return strong; }
100
+
101
+ // pragma MARK: Result<std::shared_ptr<Promise<bool>>>
102
+ using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
103
+ inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
104
+ return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
105
+ }
106
+ inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
107
+ return Result<std::shared_ptr<Promise<bool>>>::withError(error);
108
+ }
109
+
110
+ } // namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged::bridge::swift
@@ -0,0 +1,44 @@
1
+ ///
2
+ /// ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Umbrella.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ // Forward declarations of C++ defined types
11
+ // Forward declaration of `HybridReactNativeCheckBiometricAuthChangedSpec` to properly resolve imports.
12
+ namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged { class HybridReactNativeCheckBiometricAuthChangedSpec; }
13
+
14
+ // Include C++ defined types
15
+ #include "HybridReactNativeCheckBiometricAuthChangedSpec.hpp"
16
+ #include <NitroModules/Promise.hpp>
17
+ #include <NitroModules/Result.hpp>
18
+ #include <exception>
19
+ #include <memory>
20
+
21
+ // C++ helpers for Swift
22
+ #include "ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Bridge.hpp"
23
+
24
+ // Common C++ types used in Swift
25
+ #include <NitroModules/ArrayBufferHolder.hpp>
26
+ #include <NitroModules/AnyMapUtils.hpp>
27
+ #include <NitroModules/RuntimeError.hpp>
28
+ #include <NitroModules/DateToChronoDate.hpp>
29
+
30
+ // Forward declarations of Swift defined types
31
+ // Forward declaration of `HybridReactNativeCheckBiometricAuthChangedSpec_cxx` to properly resolve imports.
32
+ namespace ReactNativeCheckBiometricAuthChanged { class HybridReactNativeCheckBiometricAuthChangedSpec_cxx; }
33
+
34
+ // Include Swift defined types
35
+ #if __has_include("ReactNativeCheckBiometricAuthChanged-Swift.h")
36
+ // This header is generated by Xcode/Swift on every app build.
37
+ // If it cannot be found, make sure the Swift module's name (= podspec name) is actually "ReactNativeCheckBiometricAuthChanged".
38
+ #include "ReactNativeCheckBiometricAuthChanged-Swift.h"
39
+ // Same as above, but used when building with frameworks (`use_frameworks`)
40
+ #elif __has_include(<ReactNativeCheckBiometricAuthChanged/ReactNativeCheckBiometricAuthChanged-Swift.h>)
41
+ #include <ReactNativeCheckBiometricAuthChanged/ReactNativeCheckBiometricAuthChanged-Swift.h>
42
+ #else
43
+ #error ReactNativeCheckBiometricAuthChanged's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "ReactNativeCheckBiometricAuthChanged", and try building the app first.
44
+ #endif
@@ -0,0 +1,33 @@
1
+ ///
2
+ /// ReactNativeCheckBiometricAuthChangedAutolinking.mm
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <NitroModules/HybridObjectRegistry.hpp>
10
+ #import "ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Umbrella.hpp"
11
+ #import <type_traits>
12
+
13
+ #include "HybridReactNativeCheckBiometricAuthChangedSpecSwift.hpp"
14
+
15
+ @interface ReactNativeCheckBiometricAuthChangedAutolinking : NSObject
16
+ @end
17
+
18
+ @implementation ReactNativeCheckBiometricAuthChangedAutolinking
19
+
20
+ + (void) load {
21
+ using namespace margelo::nitro;
22
+ using namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged;
23
+
24
+ HybridObjectRegistry::registerHybridObjectConstructor(
25
+ "ReactNativeCheckBiometricAuthChanged",
26
+ []() -> std::shared_ptr<HybridObject> {
27
+ std::shared_ptr<HybridReactNativeCheckBiometricAuthChangedSpec> hybridObject = ReactNativeCheckBiometricAuthChanged::ReactNativeCheckBiometricAuthChangedAutolinking::createReactNativeCheckBiometricAuthChanged();
28
+ return hybridObject;
29
+ }
30
+ );
31
+ }
32
+
33
+ @end
@@ -0,0 +1,25 @@
1
+ ///
2
+ /// ReactNativeCheckBiometricAuthChangedAutolinking.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ public final class ReactNativeCheckBiometricAuthChangedAutolinking {
9
+ public typealias bridge = margelo.nitro.onekeyfe_reactnativecheckbiometricauthchanged.bridge.swift
10
+
11
+ /**
12
+ * Creates an instance of a Swift class that implements `HybridReactNativeCheckBiometricAuthChangedSpec`,
13
+ * and wraps it in a Swift class that can directly interop with C++ (`HybridReactNativeCheckBiometricAuthChangedSpec_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, `ReactNativeCheckBiometricAuthChanged`).
17
+ */
18
+ public static func createReactNativeCheckBiometricAuthChanged() -> bridge.std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_ {
19
+ let hybridObject = ReactNativeCheckBiometricAuthChanged()
20
+ return { () -> bridge.std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_ in
21
+ let __cxxWrapped = hybridObject.getCxxWrapper()
22
+ return __cxxWrapped.getCxxPart()
23
+ }()
24
+ }
25
+ }
@@ -0,0 +1,11 @@
1
+ ///
2
+ /// HybridReactNativeCheckBiometricAuthChangedSpecSwift.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include "HybridReactNativeCheckBiometricAuthChangedSpecSwift.hpp"
9
+
10
+ namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged {
11
+ } // namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged
@@ -0,0 +1,76 @@
1
+ ///
2
+ /// HybridReactNativeCheckBiometricAuthChangedSpecSwift.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #include "HybridReactNativeCheckBiometricAuthChangedSpec.hpp"
11
+
12
+ // Forward declaration of `HybridReactNativeCheckBiometricAuthChangedSpec_cxx` to properly resolve imports.
13
+ namespace ReactNativeCheckBiometricAuthChanged { class HybridReactNativeCheckBiometricAuthChangedSpec_cxx; }
14
+
15
+
16
+
17
+ #include <NitroModules/Promise.hpp>
18
+
19
+ #include "ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Umbrella.hpp"
20
+
21
+ namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged {
22
+
23
+ /**
24
+ * The C++ part of HybridReactNativeCheckBiometricAuthChangedSpec_cxx.swift.
25
+ *
26
+ * HybridReactNativeCheckBiometricAuthChangedSpecSwift (C++) accesses HybridReactNativeCheckBiometricAuthChangedSpec_cxx (Swift), and might
27
+ * contain some additional bridging code for C++ <> Swift interop.
28
+ *
29
+ * Since this obviously introduces an overhead, I hope at some point in
30
+ * the future, HybridReactNativeCheckBiometricAuthChangedSpec_cxx can directly inherit from the C++ class HybridReactNativeCheckBiometricAuthChangedSpec
31
+ * to simplify the whole structure and memory management.
32
+ */
33
+ class HybridReactNativeCheckBiometricAuthChangedSpecSwift: public virtual HybridReactNativeCheckBiometricAuthChangedSpec {
34
+ public:
35
+ // Constructor from a Swift instance
36
+ explicit HybridReactNativeCheckBiometricAuthChangedSpecSwift(const ReactNativeCheckBiometricAuthChanged::HybridReactNativeCheckBiometricAuthChangedSpec_cxx& swiftPart):
37
+ HybridObject(HybridReactNativeCheckBiometricAuthChangedSpec::TAG),
38
+ _swiftPart(swiftPart) { }
39
+
40
+ public:
41
+ // Get the Swift part
42
+ inline ReactNativeCheckBiometricAuthChanged::HybridReactNativeCheckBiometricAuthChangedSpec_cxx& getSwiftPart() noexcept {
43
+ return _swiftPart;
44
+ }
45
+
46
+ public:
47
+ inline size_t getExternalMemorySize() noexcept override {
48
+ return _swiftPart.getMemorySize();
49
+ }
50
+ void dispose() noexcept override {
51
+ _swiftPart.dispose();
52
+ }
53
+ std::string toString() override {
54
+ return _swiftPart.toString();
55
+ }
56
+
57
+ public:
58
+ // Properties
59
+
60
+
61
+ public:
62
+ // Methods
63
+ inline std::shared_ptr<Promise<bool>> checkChanged() override {
64
+ auto __result = _swiftPart.checkChanged();
65
+ if (__result.hasError()) [[unlikely]] {
66
+ std::rethrow_exception(__result.error());
67
+ }
68
+ auto __value = std::move(__result.value());
69
+ return __value;
70
+ }
71
+
72
+ private:
73
+ ReactNativeCheckBiometricAuthChanged::HybridReactNativeCheckBiometricAuthChangedSpec_cxx _swiftPart;
74
+ };
75
+
76
+ } // namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged
@@ -0,0 +1,47 @@
1
+ ///
2
+ /// Func_void_bool.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import Foundation
9
+ import NitroModules
10
+
11
+ /**
12
+ * Wraps a Swift `(_ value: Bool) -> Void` as a class.
13
+ * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
14
+ */
15
+ public final class Func_void_bool {
16
+ public typealias bridge = margelo.nitro.onekeyfe_reactnativecheckbiometricauthchanged.bridge.swift
17
+
18
+ private let closure: (_ value: Bool) -> Void
19
+
20
+ public init(_ closure: @escaping (_ value: Bool) -> Void) {
21
+ self.closure = closure
22
+ }
23
+
24
+ @inline(__always)
25
+ public func call(value: Bool) -> Void {
26
+ self.closure(value)
27
+ }
28
+
29
+ /**
30
+ * Casts this instance to a retained unsafe raw pointer.
31
+ * This acquires one additional strong reference on the object!
32
+ */
33
+ @inline(__always)
34
+ public func toUnsafe() -> UnsafeMutableRawPointer {
35
+ return Unmanaged.passRetained(self).toOpaque()
36
+ }
37
+
38
+ /**
39
+ * Casts an unsafe pointer to a `Func_void_bool`.
40
+ * The pointer has to be a retained opaque `Unmanaged<Func_void_bool>`.
41
+ * This removes one strong reference from the object!
42
+ */
43
+ @inline(__always)
44
+ public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_bool {
45
+ return Unmanaged<Func_void_bool>.fromOpaque(pointer).takeRetainedValue()
46
+ }
47
+ }