@onekeyfe/react-native-bundle-crypto 3.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +36 -0
- package/ReactNativeBundleCrypto.podspec +35 -0
- package/android/CMakeLists.txt +24 -0
- package/android/build.gradle +136 -0
- package/android/gradle.properties +4 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/reactnativebundlecrypto/BundleCryptoCore.kt +526 -0
- package/android/src/main/java/com/margelo/nitro/reactnativebundlecrypto/ReactNativeBundleCrypto.kt +110 -0
- package/android/src/main/java/com/margelo/nitro/reactnativebundlecrypto/ReactNativeBundleCryptoPackage.kt +24 -0
- package/ios/BundleCryptoCore.swift +529 -0
- package/ios/Frameworks/Gopenpgp.xcframework/Info.plist +52 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Gopenpgp +0 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Armor.objc.h +96 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Constants.objc.h +197 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Crypto.objc.h +1963 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Gopenpgp.h +23 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Mime.objc.h +59 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Mobile.objc.h +252 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Profile.objc.h +107 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/Universe.objc.h +29 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Headers/ref.h +35 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Info.plist +20 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64/Gopenpgp.framework/Modules/module.modulemap +13 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Gopenpgp +0 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Armor.objc.h +96 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Constants.objc.h +197 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Crypto.objc.h +1963 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Gopenpgp.h +23 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Mime.objc.h +59 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Mobile.objc.h +252 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Profile.objc.h +107 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/Universe.objc.h +29 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Headers/ref.h +35 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Info.plist +20 -0
- package/ios/Frameworks/Gopenpgp.xcframework/ios-arm64_x86_64-simulator/Gopenpgp.framework/Modules/module.modulemap +13 -0
- package/ios/ReactNativeBundleCrypto.swift +104 -0
- package/lib/module/ReactNativeBundleCrypto.nitro.js +4 -0
- package/lib/module/ReactNativeBundleCrypto.nitro.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/ReactNativeBundleCrypto.nitro.d.ts +35 -0
- package/lib/typescript/src/ReactNativeBundleCrypto.nitro.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/nitro.json +17 -0
- package/nitrogen/generated/android/c++/JDirHashEntry.hpp +61 -0
- package/nitrogen/generated/android/c++/JHybridReactNativeBundleCryptoSpec.cpp +240 -0
- package/nitrogen/generated/android/c++/JHybridReactNativeBundleCryptoSpec.hpp +74 -0
- package/nitrogen/generated/android/c++/JSha256Result.hpp +62 -0
- package/nitrogen/generated/android/c++/JVerifyDetachedAscResult.hpp +66 -0
- package/nitrogen/generated/android/c++/JVerifyGpgCleartextResult.hpp +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/DirHashEntry.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/HybridReactNativeBundleCryptoSpec.kt +94 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/Sha256Result.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/VerifyDetachedAscResult.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/VerifyGpgCleartextResult.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/reactnativebundlecryptoOnLoad.kt +35 -0
- package/nitrogen/generated/android/reactnativebundlecrypto+autolinking.cmake +81 -0
- package/nitrogen/generated/android/reactnativebundlecrypto+autolinking.gradle +27 -0
- package/nitrogen/generated/android/reactnativebundlecryptoOnLoad.cpp +44 -0
- package/nitrogen/generated/android/reactnativebundlecryptoOnLoad.hpp +25 -0
- package/nitrogen/generated/ios/ReactNativeBundleCrypto+autolinking.rb +60 -0
- package/nitrogen/generated/ios/ReactNativeBundleCrypto-Swift-Cxx-Bridge.cpp +97 -0
- package/nitrogen/generated/ios/ReactNativeBundleCrypto-Swift-Cxx-Bridge.hpp +429 -0
- package/nitrogen/generated/ios/ReactNativeBundleCrypto-Swift-Cxx-Umbrella.hpp +59 -0
- package/nitrogen/generated/ios/ReactNativeBundleCryptoAutolinking.mm +33 -0
- package/nitrogen/generated/ios/ReactNativeBundleCryptoAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridReactNativeBundleCryptoSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridReactNativeBundleCryptoSpecSwift.hpp +162 -0
- package/nitrogen/generated/ios/swift/DirHashEntry.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_Sha256Result.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_VerifyDetachedAscResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_VerifyGpgCleartextResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_DirHashEntry_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridReactNativeBundleCryptoSpec.swift +65 -0
- package/nitrogen/generated/ios/swift/HybridReactNativeBundleCryptoSpec_cxx.swift +314 -0
- package/nitrogen/generated/ios/swift/Sha256Result.swift +85 -0
- package/nitrogen/generated/ios/swift/VerifyDetachedAscResult.swift +96 -0
- package/nitrogen/generated/ios/swift/VerifyGpgCleartextResult.swift +96 -0
- package/nitrogen/generated/shared/c++/DirHashEntry.hpp +79 -0
- package/nitrogen/generated/shared/c++/HybridReactNativeBundleCryptoSpec.cpp +30 -0
- package/nitrogen/generated/shared/c++/HybridReactNativeBundleCryptoSpec.hpp +84 -0
- package/nitrogen/generated/shared/c++/Sha256Result.hpp +80 -0
- package/nitrogen/generated/shared/c++/VerifyDetachedAscResult.hpp +84 -0
- package/nitrogen/generated/shared/c++/VerifyGpgCleartextResult.hpp +84 -0
- package/package.json +169 -0
- package/src/ReactNativeBundleCrypto.nitro.ts +56 -0
- package/src/index.tsx +8 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeBundleCrypto-Swift-Cxx-Bridge.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `DirHashEntry` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::reactnativebundlecrypto { struct DirHashEntry; }
|
|
13
|
+
// Forward declaration of `HybridReactNativeBundleCryptoSpec` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::reactnativebundlecrypto { class HybridReactNativeBundleCryptoSpec; }
|
|
15
|
+
// Forward declaration of `Sha256Result` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::reactnativebundlecrypto { struct Sha256Result; }
|
|
17
|
+
// Forward declaration of `VerifyDetachedAscResult` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::reactnativebundlecrypto { struct VerifyDetachedAscResult; }
|
|
19
|
+
// Forward declaration of `VerifyGpgCleartextResult` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::reactnativebundlecrypto { struct VerifyGpgCleartextResult; }
|
|
21
|
+
|
|
22
|
+
// Forward declarations of Swift defined types
|
|
23
|
+
// Forward declaration of `HybridReactNativeBundleCryptoSpec_cxx` to properly resolve imports.
|
|
24
|
+
namespace ReactNativeBundleCrypto { class HybridReactNativeBundleCryptoSpec_cxx; }
|
|
25
|
+
|
|
26
|
+
// Include C++ defined types
|
|
27
|
+
#include "DirHashEntry.hpp"
|
|
28
|
+
#include "HybridReactNativeBundleCryptoSpec.hpp"
|
|
29
|
+
#include "Sha256Result.hpp"
|
|
30
|
+
#include "VerifyDetachedAscResult.hpp"
|
|
31
|
+
#include "VerifyGpgCleartextResult.hpp"
|
|
32
|
+
#include <NitroModules/Promise.hpp>
|
|
33
|
+
#include <NitroModules/PromiseHolder.hpp>
|
|
34
|
+
#include <NitroModules/Result.hpp>
|
|
35
|
+
#include <exception>
|
|
36
|
+
#include <functional>
|
|
37
|
+
#include <memory>
|
|
38
|
+
#include <optional>
|
|
39
|
+
#include <string>
|
|
40
|
+
#include <vector>
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Contains specialized versions of C++ templated types so they can be accessed from Swift,
|
|
44
|
+
* as well as helper functions to interact with those C++ types from Swift.
|
|
45
|
+
*/
|
|
46
|
+
namespace margelo::nitro::reactnativebundlecrypto::bridge::swift {
|
|
47
|
+
|
|
48
|
+
// pragma MARK: std::optional<std::string>
|
|
49
|
+
/**
|
|
50
|
+
* Specialized version of `std::optional<std::string>`.
|
|
51
|
+
*/
|
|
52
|
+
using std__optional_std__string_ = std::optional<std::string>;
|
|
53
|
+
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
|
|
54
|
+
return std::optional<std::string>(value);
|
|
55
|
+
}
|
|
56
|
+
inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
57
|
+
return optional.has_value();
|
|
58
|
+
}
|
|
59
|
+
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
60
|
+
return *optional;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// pragma MARK: std::shared_ptr<Promise<VerifyGpgCleartextResult>>
|
|
64
|
+
/**
|
|
65
|
+
* Specialized version of `std::shared_ptr<Promise<VerifyGpgCleartextResult>>`.
|
|
66
|
+
*/
|
|
67
|
+
using std__shared_ptr_Promise_VerifyGpgCleartextResult__ = std::shared_ptr<Promise<VerifyGpgCleartextResult>>;
|
|
68
|
+
inline std::shared_ptr<Promise<VerifyGpgCleartextResult>> create_std__shared_ptr_Promise_VerifyGpgCleartextResult__() noexcept {
|
|
69
|
+
return Promise<VerifyGpgCleartextResult>::create();
|
|
70
|
+
}
|
|
71
|
+
inline PromiseHolder<VerifyGpgCleartextResult> wrap_std__shared_ptr_Promise_VerifyGpgCleartextResult__(std::shared_ptr<Promise<VerifyGpgCleartextResult>> promise) noexcept {
|
|
72
|
+
return PromiseHolder<VerifyGpgCleartextResult>(std::move(promise));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// pragma MARK: std::function<void(const VerifyGpgCleartextResult& /* result */)>
|
|
76
|
+
/**
|
|
77
|
+
* Specialized version of `std::function<void(const VerifyGpgCleartextResult&)>`.
|
|
78
|
+
*/
|
|
79
|
+
using Func_void_VerifyGpgCleartextResult = std::function<void(const VerifyGpgCleartextResult& /* result */)>;
|
|
80
|
+
/**
|
|
81
|
+
* Wrapper class for a `std::function<void(const VerifyGpgCleartextResult& / * result * /)>`, this can be used from Swift.
|
|
82
|
+
*/
|
|
83
|
+
class Func_void_VerifyGpgCleartextResult_Wrapper final {
|
|
84
|
+
public:
|
|
85
|
+
explicit Func_void_VerifyGpgCleartextResult_Wrapper(std::function<void(const VerifyGpgCleartextResult& /* result */)>&& func): _function(std::make_unique<std::function<void(const VerifyGpgCleartextResult& /* result */)>>(std::move(func))) {}
|
|
86
|
+
inline void call(VerifyGpgCleartextResult result) const noexcept {
|
|
87
|
+
_function->operator()(result);
|
|
88
|
+
}
|
|
89
|
+
private:
|
|
90
|
+
std::unique_ptr<std::function<void(const VerifyGpgCleartextResult& /* result */)>> _function;
|
|
91
|
+
} SWIFT_NONCOPYABLE;
|
|
92
|
+
Func_void_VerifyGpgCleartextResult create_Func_void_VerifyGpgCleartextResult(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
93
|
+
inline Func_void_VerifyGpgCleartextResult_Wrapper wrap_Func_void_VerifyGpgCleartextResult(Func_void_VerifyGpgCleartextResult value) noexcept {
|
|
94
|
+
return Func_void_VerifyGpgCleartextResult_Wrapper(std::move(value));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
98
|
+
/**
|
|
99
|
+
* Specialized version of `std::function<void(const std::exception_ptr&)>`.
|
|
100
|
+
*/
|
|
101
|
+
using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
|
|
102
|
+
/**
|
|
103
|
+
* Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
|
|
104
|
+
*/
|
|
105
|
+
class Func_void_std__exception_ptr_Wrapper final {
|
|
106
|
+
public:
|
|
107
|
+
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))) {}
|
|
108
|
+
inline void call(std::exception_ptr error) const noexcept {
|
|
109
|
+
_function->operator()(error);
|
|
110
|
+
}
|
|
111
|
+
private:
|
|
112
|
+
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
113
|
+
} SWIFT_NONCOPYABLE;
|
|
114
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
115
|
+
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
|
|
116
|
+
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// pragma MARK: std::shared_ptr<Promise<VerifyDetachedAscResult>>
|
|
120
|
+
/**
|
|
121
|
+
* Specialized version of `std::shared_ptr<Promise<VerifyDetachedAscResult>>`.
|
|
122
|
+
*/
|
|
123
|
+
using std__shared_ptr_Promise_VerifyDetachedAscResult__ = std::shared_ptr<Promise<VerifyDetachedAscResult>>;
|
|
124
|
+
inline std::shared_ptr<Promise<VerifyDetachedAscResult>> create_std__shared_ptr_Promise_VerifyDetachedAscResult__() noexcept {
|
|
125
|
+
return Promise<VerifyDetachedAscResult>::create();
|
|
126
|
+
}
|
|
127
|
+
inline PromiseHolder<VerifyDetachedAscResult> wrap_std__shared_ptr_Promise_VerifyDetachedAscResult__(std::shared_ptr<Promise<VerifyDetachedAscResult>> promise) noexcept {
|
|
128
|
+
return PromiseHolder<VerifyDetachedAscResult>(std::move(promise));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// pragma MARK: std::function<void(const VerifyDetachedAscResult& /* result */)>
|
|
132
|
+
/**
|
|
133
|
+
* Specialized version of `std::function<void(const VerifyDetachedAscResult&)>`.
|
|
134
|
+
*/
|
|
135
|
+
using Func_void_VerifyDetachedAscResult = std::function<void(const VerifyDetachedAscResult& /* result */)>;
|
|
136
|
+
/**
|
|
137
|
+
* Wrapper class for a `std::function<void(const VerifyDetachedAscResult& / * result * /)>`, this can be used from Swift.
|
|
138
|
+
*/
|
|
139
|
+
class Func_void_VerifyDetachedAscResult_Wrapper final {
|
|
140
|
+
public:
|
|
141
|
+
explicit Func_void_VerifyDetachedAscResult_Wrapper(std::function<void(const VerifyDetachedAscResult& /* result */)>&& func): _function(std::make_unique<std::function<void(const VerifyDetachedAscResult& /* result */)>>(std::move(func))) {}
|
|
142
|
+
inline void call(VerifyDetachedAscResult result) const noexcept {
|
|
143
|
+
_function->operator()(result);
|
|
144
|
+
}
|
|
145
|
+
private:
|
|
146
|
+
std::unique_ptr<std::function<void(const VerifyDetachedAscResult& /* result */)>> _function;
|
|
147
|
+
} SWIFT_NONCOPYABLE;
|
|
148
|
+
Func_void_VerifyDetachedAscResult create_Func_void_VerifyDetachedAscResult(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
149
|
+
inline Func_void_VerifyDetachedAscResult_Wrapper wrap_Func_void_VerifyDetachedAscResult(Func_void_VerifyDetachedAscResult value) noexcept {
|
|
150
|
+
return Func_void_VerifyDetachedAscResult_Wrapper(std::move(value));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// pragma MARK: std::shared_ptr<Promise<Sha256Result>>
|
|
154
|
+
/**
|
|
155
|
+
* Specialized version of `std::shared_ptr<Promise<Sha256Result>>`.
|
|
156
|
+
*/
|
|
157
|
+
using std__shared_ptr_Promise_Sha256Result__ = std::shared_ptr<Promise<Sha256Result>>;
|
|
158
|
+
inline std::shared_ptr<Promise<Sha256Result>> create_std__shared_ptr_Promise_Sha256Result__() noexcept {
|
|
159
|
+
return Promise<Sha256Result>::create();
|
|
160
|
+
}
|
|
161
|
+
inline PromiseHolder<Sha256Result> wrap_std__shared_ptr_Promise_Sha256Result__(std::shared_ptr<Promise<Sha256Result>> promise) noexcept {
|
|
162
|
+
return PromiseHolder<Sha256Result>(std::move(promise));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// pragma MARK: std::function<void(const Sha256Result& /* result */)>
|
|
166
|
+
/**
|
|
167
|
+
* Specialized version of `std::function<void(const Sha256Result&)>`.
|
|
168
|
+
*/
|
|
169
|
+
using Func_void_Sha256Result = std::function<void(const Sha256Result& /* result */)>;
|
|
170
|
+
/**
|
|
171
|
+
* Wrapper class for a `std::function<void(const Sha256Result& / * result * /)>`, this can be used from Swift.
|
|
172
|
+
*/
|
|
173
|
+
class Func_void_Sha256Result_Wrapper final {
|
|
174
|
+
public:
|
|
175
|
+
explicit Func_void_Sha256Result_Wrapper(std::function<void(const Sha256Result& /* result */)>&& func): _function(std::make_unique<std::function<void(const Sha256Result& /* result */)>>(std::move(func))) {}
|
|
176
|
+
inline void call(Sha256Result result) const noexcept {
|
|
177
|
+
_function->operator()(result);
|
|
178
|
+
}
|
|
179
|
+
private:
|
|
180
|
+
std::unique_ptr<std::function<void(const Sha256Result& /* result */)>> _function;
|
|
181
|
+
} SWIFT_NONCOPYABLE;
|
|
182
|
+
Func_void_Sha256Result create_Func_void_Sha256Result(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
183
|
+
inline Func_void_Sha256Result_Wrapper wrap_Func_void_Sha256Result(Func_void_Sha256Result value) noexcept {
|
|
184
|
+
return Func_void_Sha256Result_Wrapper(std::move(value));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// pragma MARK: std::shared_ptr<Promise<bool>>
|
|
188
|
+
/**
|
|
189
|
+
* Specialized version of `std::shared_ptr<Promise<bool>>`.
|
|
190
|
+
*/
|
|
191
|
+
using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
|
|
192
|
+
inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
|
|
193
|
+
return Promise<bool>::create();
|
|
194
|
+
}
|
|
195
|
+
inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
|
|
196
|
+
return PromiseHolder<bool>(std::move(promise));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// pragma MARK: std::function<void(bool /* result */)>
|
|
200
|
+
/**
|
|
201
|
+
* Specialized version of `std::function<void(bool)>`.
|
|
202
|
+
*/
|
|
203
|
+
using Func_void_bool = std::function<void(bool /* result */)>;
|
|
204
|
+
/**
|
|
205
|
+
* Wrapper class for a `std::function<void(bool / * result * /)>`, this can be used from Swift.
|
|
206
|
+
*/
|
|
207
|
+
class Func_void_bool_Wrapper final {
|
|
208
|
+
public:
|
|
209
|
+
explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
|
|
210
|
+
inline void call(bool result) const noexcept {
|
|
211
|
+
_function->operator()(result);
|
|
212
|
+
}
|
|
213
|
+
private:
|
|
214
|
+
std::unique_ptr<std::function<void(bool /* result */)>> _function;
|
|
215
|
+
} SWIFT_NONCOPYABLE;
|
|
216
|
+
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
217
|
+
inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
|
|
218
|
+
return Func_void_bool_Wrapper(std::move(value));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// pragma MARK: std::vector<DirHashEntry>
|
|
222
|
+
/**
|
|
223
|
+
* Specialized version of `std::vector<DirHashEntry>`.
|
|
224
|
+
*/
|
|
225
|
+
using std__vector_DirHashEntry_ = std::vector<DirHashEntry>;
|
|
226
|
+
inline std::vector<DirHashEntry> create_std__vector_DirHashEntry_(size_t size) noexcept {
|
|
227
|
+
std::vector<DirHashEntry> vector;
|
|
228
|
+
vector.reserve(size);
|
|
229
|
+
return vector;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// pragma MARK: std::shared_ptr<Promise<std::vector<DirHashEntry>>>
|
|
233
|
+
/**
|
|
234
|
+
* Specialized version of `std::shared_ptr<Promise<std::vector<DirHashEntry>>>`.
|
|
235
|
+
*/
|
|
236
|
+
using std__shared_ptr_Promise_std__vector_DirHashEntry___ = std::shared_ptr<Promise<std::vector<DirHashEntry>>>;
|
|
237
|
+
inline std::shared_ptr<Promise<std::vector<DirHashEntry>>> create_std__shared_ptr_Promise_std__vector_DirHashEntry___() noexcept {
|
|
238
|
+
return Promise<std::vector<DirHashEntry>>::create();
|
|
239
|
+
}
|
|
240
|
+
inline PromiseHolder<std::vector<DirHashEntry>> wrap_std__shared_ptr_Promise_std__vector_DirHashEntry___(std::shared_ptr<Promise<std::vector<DirHashEntry>>> promise) noexcept {
|
|
241
|
+
return PromiseHolder<std::vector<DirHashEntry>>(std::move(promise));
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// pragma MARK: std::function<void(const std::vector<DirHashEntry>& /* result */)>
|
|
245
|
+
/**
|
|
246
|
+
* Specialized version of `std::function<void(const std::vector<DirHashEntry>&)>`.
|
|
247
|
+
*/
|
|
248
|
+
using Func_void_std__vector_DirHashEntry_ = std::function<void(const std::vector<DirHashEntry>& /* result */)>;
|
|
249
|
+
/**
|
|
250
|
+
* Wrapper class for a `std::function<void(const std::vector<DirHashEntry>& / * result * /)>`, this can be used from Swift.
|
|
251
|
+
*/
|
|
252
|
+
class Func_void_std__vector_DirHashEntry__Wrapper final {
|
|
253
|
+
public:
|
|
254
|
+
explicit Func_void_std__vector_DirHashEntry__Wrapper(std::function<void(const std::vector<DirHashEntry>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<DirHashEntry>& /* result */)>>(std::move(func))) {}
|
|
255
|
+
inline void call(std::vector<DirHashEntry> result) const noexcept {
|
|
256
|
+
_function->operator()(result);
|
|
257
|
+
}
|
|
258
|
+
private:
|
|
259
|
+
std::unique_ptr<std::function<void(const std::vector<DirHashEntry>& /* result */)>> _function;
|
|
260
|
+
} SWIFT_NONCOPYABLE;
|
|
261
|
+
Func_void_std__vector_DirHashEntry_ create_Func_void_std__vector_DirHashEntry_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
262
|
+
inline Func_void_std__vector_DirHashEntry__Wrapper wrap_Func_void_std__vector_DirHashEntry_(Func_void_std__vector_DirHashEntry_ value) noexcept {
|
|
263
|
+
return Func_void_std__vector_DirHashEntry__Wrapper(std::move(value));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// pragma MARK: std::shared_ptr<Promise<void>>
|
|
267
|
+
/**
|
|
268
|
+
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
269
|
+
*/
|
|
270
|
+
using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
|
|
271
|
+
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
|
|
272
|
+
return Promise<void>::create();
|
|
273
|
+
}
|
|
274
|
+
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
|
|
275
|
+
return PromiseHolder<void>(std::move(promise));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// pragma MARK: std::function<void()>
|
|
279
|
+
/**
|
|
280
|
+
* Specialized version of `std::function<void()>`.
|
|
281
|
+
*/
|
|
282
|
+
using Func_void = std::function<void()>;
|
|
283
|
+
/**
|
|
284
|
+
* Wrapper class for a `std::function<void()>`, this can be used from Swift.
|
|
285
|
+
*/
|
|
286
|
+
class Func_void_Wrapper final {
|
|
287
|
+
public:
|
|
288
|
+
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
|
|
289
|
+
inline void call() const noexcept {
|
|
290
|
+
_function->operator()();
|
|
291
|
+
}
|
|
292
|
+
private:
|
|
293
|
+
std::unique_ptr<std::function<void()>> _function;
|
|
294
|
+
} SWIFT_NONCOPYABLE;
|
|
295
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
296
|
+
inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
|
|
297
|
+
return Func_void_Wrapper(std::move(value));
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// pragma MARK: std::vector<std::string>
|
|
301
|
+
/**
|
|
302
|
+
* Specialized version of `std::vector<std::string>`.
|
|
303
|
+
*/
|
|
304
|
+
using std__vector_std__string_ = std::vector<std::string>;
|
|
305
|
+
inline std::vector<std::string> create_std__vector_std__string_(size_t size) noexcept {
|
|
306
|
+
std::vector<std::string> vector;
|
|
307
|
+
vector.reserve(size);
|
|
308
|
+
return vector;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// pragma MARK: std::shared_ptr<Promise<std::vector<std::string>>>
|
|
312
|
+
/**
|
|
313
|
+
* Specialized version of `std::shared_ptr<Promise<std::vector<std::string>>>`.
|
|
314
|
+
*/
|
|
315
|
+
using std__shared_ptr_Promise_std__vector_std__string___ = std::shared_ptr<Promise<std::vector<std::string>>>;
|
|
316
|
+
inline std::shared_ptr<Promise<std::vector<std::string>>> create_std__shared_ptr_Promise_std__vector_std__string___() noexcept {
|
|
317
|
+
return Promise<std::vector<std::string>>::create();
|
|
318
|
+
}
|
|
319
|
+
inline PromiseHolder<std::vector<std::string>> wrap_std__shared_ptr_Promise_std__vector_std__string___(std::shared_ptr<Promise<std::vector<std::string>>> promise) noexcept {
|
|
320
|
+
return PromiseHolder<std::vector<std::string>>(std::move(promise));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// pragma MARK: std::function<void(const std::vector<std::string>& /* result */)>
|
|
324
|
+
/**
|
|
325
|
+
* Specialized version of `std::function<void(const std::vector<std::string>&)>`.
|
|
326
|
+
*/
|
|
327
|
+
using Func_void_std__vector_std__string_ = std::function<void(const std::vector<std::string>& /* result */)>;
|
|
328
|
+
/**
|
|
329
|
+
* Wrapper class for a `std::function<void(const std::vector<std::string>& / * result * /)>`, this can be used from Swift.
|
|
330
|
+
*/
|
|
331
|
+
class Func_void_std__vector_std__string__Wrapper final {
|
|
332
|
+
public:
|
|
333
|
+
explicit Func_void_std__vector_std__string__Wrapper(std::function<void(const std::vector<std::string>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<std::string>& /* result */)>>(std::move(func))) {}
|
|
334
|
+
inline void call(std::vector<std::string> result) const noexcept {
|
|
335
|
+
_function->operator()(result);
|
|
336
|
+
}
|
|
337
|
+
private:
|
|
338
|
+
std::unique_ptr<std::function<void(const std::vector<std::string>& /* result */)>> _function;
|
|
339
|
+
} SWIFT_NONCOPYABLE;
|
|
340
|
+
Func_void_std__vector_std__string_ create_Func_void_std__vector_std__string_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
341
|
+
inline Func_void_std__vector_std__string__Wrapper wrap_Func_void_std__vector_std__string_(Func_void_std__vector_std__string_ value) noexcept {
|
|
342
|
+
return Func_void_std__vector_std__string__Wrapper(std::move(value));
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// pragma MARK: std::shared_ptr<HybridReactNativeBundleCryptoSpec>
|
|
346
|
+
/**
|
|
347
|
+
* Specialized version of `std::shared_ptr<HybridReactNativeBundleCryptoSpec>`.
|
|
348
|
+
*/
|
|
349
|
+
using std__shared_ptr_HybridReactNativeBundleCryptoSpec_ = std::shared_ptr<HybridReactNativeBundleCryptoSpec>;
|
|
350
|
+
std::shared_ptr<HybridReactNativeBundleCryptoSpec> create_std__shared_ptr_HybridReactNativeBundleCryptoSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
351
|
+
void* NON_NULL get_std__shared_ptr_HybridReactNativeBundleCryptoSpec_(std__shared_ptr_HybridReactNativeBundleCryptoSpec_ cppType);
|
|
352
|
+
|
|
353
|
+
// pragma MARK: std::weak_ptr<HybridReactNativeBundleCryptoSpec>
|
|
354
|
+
using std__weak_ptr_HybridReactNativeBundleCryptoSpec_ = std::weak_ptr<HybridReactNativeBundleCryptoSpec>;
|
|
355
|
+
inline std__weak_ptr_HybridReactNativeBundleCryptoSpec_ weakify_std__shared_ptr_HybridReactNativeBundleCryptoSpec_(const std::shared_ptr<HybridReactNativeBundleCryptoSpec>& strong) noexcept { return strong; }
|
|
356
|
+
|
|
357
|
+
// pragma MARK: Result<std::shared_ptr<Promise<VerifyGpgCleartextResult>>>
|
|
358
|
+
using Result_std__shared_ptr_Promise_VerifyGpgCleartextResult___ = Result<std::shared_ptr<Promise<VerifyGpgCleartextResult>>>;
|
|
359
|
+
inline Result_std__shared_ptr_Promise_VerifyGpgCleartextResult___ create_Result_std__shared_ptr_Promise_VerifyGpgCleartextResult___(const std::shared_ptr<Promise<VerifyGpgCleartextResult>>& value) noexcept {
|
|
360
|
+
return Result<std::shared_ptr<Promise<VerifyGpgCleartextResult>>>::withValue(value);
|
|
361
|
+
}
|
|
362
|
+
inline Result_std__shared_ptr_Promise_VerifyGpgCleartextResult___ create_Result_std__shared_ptr_Promise_VerifyGpgCleartextResult___(const std::exception_ptr& error) noexcept {
|
|
363
|
+
return Result<std::shared_ptr<Promise<VerifyGpgCleartextResult>>>::withError(error);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// pragma MARK: Result<std::shared_ptr<Promise<VerifyDetachedAscResult>>>
|
|
367
|
+
using Result_std__shared_ptr_Promise_VerifyDetachedAscResult___ = Result<std::shared_ptr<Promise<VerifyDetachedAscResult>>>;
|
|
368
|
+
inline Result_std__shared_ptr_Promise_VerifyDetachedAscResult___ create_Result_std__shared_ptr_Promise_VerifyDetachedAscResult___(const std::shared_ptr<Promise<VerifyDetachedAscResult>>& value) noexcept {
|
|
369
|
+
return Result<std::shared_ptr<Promise<VerifyDetachedAscResult>>>::withValue(value);
|
|
370
|
+
}
|
|
371
|
+
inline Result_std__shared_ptr_Promise_VerifyDetachedAscResult___ create_Result_std__shared_ptr_Promise_VerifyDetachedAscResult___(const std::exception_ptr& error) noexcept {
|
|
372
|
+
return Result<std::shared_ptr<Promise<VerifyDetachedAscResult>>>::withError(error);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// pragma MARK: Result<std::shared_ptr<Promise<Sha256Result>>>
|
|
376
|
+
using Result_std__shared_ptr_Promise_Sha256Result___ = Result<std::shared_ptr<Promise<Sha256Result>>>;
|
|
377
|
+
inline Result_std__shared_ptr_Promise_Sha256Result___ create_Result_std__shared_ptr_Promise_Sha256Result___(const std::shared_ptr<Promise<Sha256Result>>& value) noexcept {
|
|
378
|
+
return Result<std::shared_ptr<Promise<Sha256Result>>>::withValue(value);
|
|
379
|
+
}
|
|
380
|
+
inline Result_std__shared_ptr_Promise_Sha256Result___ create_Result_std__shared_ptr_Promise_Sha256Result___(const std::exception_ptr& error) noexcept {
|
|
381
|
+
return Result<std::shared_ptr<Promise<Sha256Result>>>::withError(error);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// pragma MARK: Result<bool>
|
|
385
|
+
using Result_bool_ = Result<bool>;
|
|
386
|
+
inline Result_bool_ create_Result_bool_(bool value) noexcept {
|
|
387
|
+
return Result<bool>::withValue(std::move(value));
|
|
388
|
+
}
|
|
389
|
+
inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) noexcept {
|
|
390
|
+
return Result<bool>::withError(error);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// pragma MARK: Result<std::shared_ptr<Promise<bool>>>
|
|
394
|
+
using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
|
|
395
|
+
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
|
|
396
|
+
return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
|
|
397
|
+
}
|
|
398
|
+
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
|
|
399
|
+
return Result<std::shared_ptr<Promise<bool>>>::withError(error);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::vector<DirHashEntry>>>>
|
|
403
|
+
using Result_std__shared_ptr_Promise_std__vector_DirHashEntry____ = Result<std::shared_ptr<Promise<std::vector<DirHashEntry>>>>;
|
|
404
|
+
inline Result_std__shared_ptr_Promise_std__vector_DirHashEntry____ create_Result_std__shared_ptr_Promise_std__vector_DirHashEntry____(const std::shared_ptr<Promise<std::vector<DirHashEntry>>>& value) noexcept {
|
|
405
|
+
return Result<std::shared_ptr<Promise<std::vector<DirHashEntry>>>>::withValue(value);
|
|
406
|
+
}
|
|
407
|
+
inline Result_std__shared_ptr_Promise_std__vector_DirHashEntry____ create_Result_std__shared_ptr_Promise_std__vector_DirHashEntry____(const std::exception_ptr& error) noexcept {
|
|
408
|
+
return Result<std::shared_ptr<Promise<std::vector<DirHashEntry>>>>::withError(error);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// pragma MARK: Result<std::shared_ptr<Promise<void>>>
|
|
412
|
+
using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
|
|
413
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
|
|
414
|
+
return Result<std::shared_ptr<Promise<void>>>::withValue(value);
|
|
415
|
+
}
|
|
416
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
|
|
417
|
+
return Result<std::shared_ptr<Promise<void>>>::withError(error);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::vector<std::string>>>>
|
|
421
|
+
using Result_std__shared_ptr_Promise_std__vector_std__string____ = Result<std::shared_ptr<Promise<std::vector<std::string>>>>;
|
|
422
|
+
inline Result_std__shared_ptr_Promise_std__vector_std__string____ create_Result_std__shared_ptr_Promise_std__vector_std__string____(const std::shared_ptr<Promise<std::vector<std::string>>>& value) noexcept {
|
|
423
|
+
return Result<std::shared_ptr<Promise<std::vector<std::string>>>>::withValue(value);
|
|
424
|
+
}
|
|
425
|
+
inline Result_std__shared_ptr_Promise_std__vector_std__string____ create_Result_std__shared_ptr_Promise_std__vector_std__string____(const std::exception_ptr& error) noexcept {
|
|
426
|
+
return Result<std::shared_ptr<Promise<std::vector<std::string>>>>::withError(error);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
} // namespace margelo::nitro::reactnativebundlecrypto::bridge::swift
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeBundleCrypto-Swift-Cxx-Umbrella.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `DirHashEntry` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::reactnativebundlecrypto { struct DirHashEntry; }
|
|
13
|
+
// Forward declaration of `HybridReactNativeBundleCryptoSpec` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::reactnativebundlecrypto { class HybridReactNativeBundleCryptoSpec; }
|
|
15
|
+
// Forward declaration of `Sha256Result` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::reactnativebundlecrypto { struct Sha256Result; }
|
|
17
|
+
// Forward declaration of `VerifyDetachedAscResult` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::reactnativebundlecrypto { struct VerifyDetachedAscResult; }
|
|
19
|
+
// Forward declaration of `VerifyGpgCleartextResult` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::reactnativebundlecrypto { struct VerifyGpgCleartextResult; }
|
|
21
|
+
|
|
22
|
+
// Include C++ defined types
|
|
23
|
+
#include "DirHashEntry.hpp"
|
|
24
|
+
#include "HybridReactNativeBundleCryptoSpec.hpp"
|
|
25
|
+
#include "Sha256Result.hpp"
|
|
26
|
+
#include "VerifyDetachedAscResult.hpp"
|
|
27
|
+
#include "VerifyGpgCleartextResult.hpp"
|
|
28
|
+
#include <NitroModules/Promise.hpp>
|
|
29
|
+
#include <NitroModules/Result.hpp>
|
|
30
|
+
#include <exception>
|
|
31
|
+
#include <memory>
|
|
32
|
+
#include <optional>
|
|
33
|
+
#include <string>
|
|
34
|
+
#include <vector>
|
|
35
|
+
|
|
36
|
+
// C++ helpers for Swift
|
|
37
|
+
#include "ReactNativeBundleCrypto-Swift-Cxx-Bridge.hpp"
|
|
38
|
+
|
|
39
|
+
// Common C++ types used in Swift
|
|
40
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
41
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
42
|
+
#include <NitroModules/RuntimeError.hpp>
|
|
43
|
+
#include <NitroModules/DateToChronoDate.hpp>
|
|
44
|
+
|
|
45
|
+
// Forward declarations of Swift defined types
|
|
46
|
+
// Forward declaration of `HybridReactNativeBundleCryptoSpec_cxx` to properly resolve imports.
|
|
47
|
+
namespace ReactNativeBundleCrypto { class HybridReactNativeBundleCryptoSpec_cxx; }
|
|
48
|
+
|
|
49
|
+
// Include Swift defined types
|
|
50
|
+
#if __has_include("ReactNativeBundleCrypto-Swift.h")
|
|
51
|
+
// This header is generated by Xcode/Swift on every app build.
|
|
52
|
+
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "ReactNativeBundleCrypto".
|
|
53
|
+
#include "ReactNativeBundleCrypto-Swift.h"
|
|
54
|
+
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
55
|
+
#elif __has_include(<ReactNativeBundleCrypto/ReactNativeBundleCrypto-Swift.h>)
|
|
56
|
+
#include <ReactNativeBundleCrypto/ReactNativeBundleCrypto-Swift.h>
|
|
57
|
+
#else
|
|
58
|
+
#error ReactNativeBundleCrypto's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "ReactNativeBundleCrypto", and try building the app first.
|
|
59
|
+
#endif
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeBundleCryptoAutolinking.mm
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <NitroModules/HybridObjectRegistry.hpp>
|
|
10
|
+
#import "ReactNativeBundleCrypto-Swift-Cxx-Umbrella.hpp"
|
|
11
|
+
#import <type_traits>
|
|
12
|
+
|
|
13
|
+
#include "HybridReactNativeBundleCryptoSpecSwift.hpp"
|
|
14
|
+
|
|
15
|
+
@interface ReactNativeBundleCryptoAutolinking : NSObject
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
@implementation ReactNativeBundleCryptoAutolinking
|
|
19
|
+
|
|
20
|
+
+ (void) load {
|
|
21
|
+
using namespace margelo::nitro;
|
|
22
|
+
using namespace margelo::nitro::reactnativebundlecrypto;
|
|
23
|
+
|
|
24
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
|
+
"ReactNativeBundleCrypto",
|
|
26
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
+
std::shared_ptr<HybridReactNativeBundleCryptoSpec> hybridObject = ReactNativeBundleCrypto::ReactNativeBundleCryptoAutolinking::createReactNativeBundleCrypto();
|
|
28
|
+
return hybridObject;
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeBundleCryptoAutolinking.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
public final class ReactNativeBundleCryptoAutolinking {
|
|
9
|
+
public typealias bridge = margelo.nitro.reactnativebundlecrypto.bridge.swift
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Creates an instance of a Swift class that implements `HybridReactNativeBundleCryptoSpec`,
|
|
13
|
+
* and wraps it in a Swift class that can directly interop with C++ (`HybridReactNativeBundleCryptoSpec_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, `ReactNativeBundleCrypto`).
|
|
17
|
+
*/
|
|
18
|
+
public static func createReactNativeBundleCrypto() -> bridge.std__shared_ptr_HybridReactNativeBundleCryptoSpec_ {
|
|
19
|
+
let hybridObject = ReactNativeBundleCrypto()
|
|
20
|
+
return { () -> bridge.std__shared_ptr_HybridReactNativeBundleCryptoSpec_ in
|
|
21
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
22
|
+
return __cxxWrapped.getCxxPart()
|
|
23
|
+
}()
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridReactNativeBundleCryptoSpecSwift.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridReactNativeBundleCryptoSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::reactnativebundlecrypto {
|
|
11
|
+
} // namespace margelo::nitro::reactnativebundlecrypto
|