react-native-nitro-ali-push 0.0.0-stage → 1.0.0
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 +215 -2
- package/android/CMakeLists.txt +31 -0
- package/android/build.gradle +139 -0
- package/android/src/main/AndroidManifest.xml +30 -0
- package/android/src/main/java/com/margelo/nitro/alipush/AliPushMessageReceiver.kt +156 -0
- package/android/src/main/java/com/margelo/nitro/alipush/HybridAliPushPlugin.kt +303 -0
- package/android/src/main/java/com/margelo/nitro/alipush/ThirdPartMessageActivity.kt +26 -0
- package/ios/HybridAliPushPlugin.swift +516 -0
- package/lib/index.d.ts +195 -0
- package/lib/index.js +269 -0
- package/lib/specs/AliPushPlugin.nitro.d.ts +88 -0
- package/lib/specs/AliPushPlugin.nitro.js +2 -0
- package/lib/types.d.ts +111 -0
- package/lib/types.js +11 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/NitroAliPush+autolinking.cmake +84 -0
- package/nitrogen/generated/android/NitroAliPush+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroAliPushOnLoad.cpp +58 -0
- package/nitrogen/generated/android/NitroAliPushOnLoad.hpp +34 -0
- package/nitrogen/generated/android/c++/JAliPushAppState.hpp +61 -0
- package/nitrogen/generated/android/c++/JAliPushMessage.hpp +98 -0
- package/nitrogen/generated/android/c++/JAliPushMessageType.hpp +58 -0
- package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_AliPushMessage.hpp +87 -0
- package/nitrogen/generated/android/c++/JHybridAliPushPluginSpec.cpp +338 -0
- package/nitrogen/generated/android/c++/JHybridAliPushPluginSpec.hpp +78 -0
- package/nitrogen/generated/android/c++/JVariant_Double_String.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_Double_String.hpp +68 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_AliPushMessage.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_AliPushMessage.hpp +80 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_String.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_String.hpp +70 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/alipush/AliPushAppState.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/alipush/AliPushMessage.kt +91 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/alipush/AliPushMessageType.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/alipush/Func_void.kt +78 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/alipush/Func_void_AliPushMessage.kt +78 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/alipush/HybridAliPushPluginSpec.kt +123 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/alipush/NitroAliPushOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/alipush/Variant_Double_String.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/alipush/Variant_NullType_AliPushMessage.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/alipush/Variant_NullType_String.kt +62 -0
- package/nitrogen/generated/ios/NitroAliPush+autolinking.rb +62 -0
- package/nitrogen/generated/ios/NitroAliPush-Swift-Cxx-Bridge.cpp +89 -0
- package/nitrogen/generated/ios/NitroAliPush-Swift-Cxx-Bridge.hpp +531 -0
- package/nitrogen/generated/ios/NitroAliPush-Swift-Cxx-Umbrella.hpp +60 -0
- package/nitrogen/generated/ios/NitroAliPushAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroAliPushAutolinking.swift +26 -0
- package/nitrogen/generated/ios/c++/HybridAliPushPluginSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridAliPushPluginSpecSwift.hpp +217 -0
- package/nitrogen/generated/ios/swift/AliPushAppState.swift +44 -0
- package/nitrogen/generated/ios/swift/AliPushMessage.swift +191 -0
- package/nitrogen/generated/ios/swift/AliPushMessageType.swift +40 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_AliPushMessage.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__AliPushMessage_.swift +58 -0
- package/nitrogen/generated/ios/swift/HybridAliPushPluginSpec.swift +70 -0
- package/nitrogen/generated/ios/swift/HybridAliPushPluginSpec_cxx.swift +476 -0
- package/nitrogen/generated/ios/swift/Variant_Double_String.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_AliPushMessage.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_String.swift +30 -0
- package/nitrogen/generated/shared/c++/AliPushAppState.hpp +80 -0
- package/nitrogen/generated/shared/c++/AliPushMessage.hpp +123 -0
- package/nitrogen/generated/shared/c++/AliPushMessageType.hpp +76 -0
- package/nitrogen/generated/shared/c++/HybridAliPushPluginSpec.cpp +36 -0
- package/nitrogen/generated/shared/c++/HybridAliPushPluginSpec.hpp +85 -0
- package/package.json +61 -4
- package/react-native-nitro-ali-push.podspec +29 -0
- package/src/index.ts +284 -0
- package/src/specs/AliPushPlugin.nitro.ts +104 -0
- package/src/types.ts +117 -0
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroAliPush-Swift-Cxx-Bridge.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `AliPushAppState` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::alipush { enum class AliPushAppState; }
|
|
13
|
+
// Forward declaration of `AliPushMessageType` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::alipush { enum class AliPushMessageType; }
|
|
15
|
+
// Forward declaration of `AliPushMessage` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::alipush { struct AliPushMessage; }
|
|
17
|
+
// Forward declaration of `HybridAliPushPluginSpec` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::alipush { class HybridAliPushPluginSpec; }
|
|
19
|
+
|
|
20
|
+
// Forward declarations of Swift defined types
|
|
21
|
+
// Forward declaration of `HybridAliPushPluginSpec_cxx` to properly resolve imports.
|
|
22
|
+
namespace NitroAliPush { class HybridAliPushPluginSpec_cxx; }
|
|
23
|
+
|
|
24
|
+
// Include C++ defined types
|
|
25
|
+
#include "AliPushAppState.hpp"
|
|
26
|
+
#include "AliPushMessage.hpp"
|
|
27
|
+
#include "AliPushMessageType.hpp"
|
|
28
|
+
#include "HybridAliPushPluginSpec.hpp"
|
|
29
|
+
#include <NitroModules/AnyMap.hpp>
|
|
30
|
+
#include <NitroModules/Null.hpp>
|
|
31
|
+
#include <NitroModules/Promise.hpp>
|
|
32
|
+
#include <NitroModules/PromiseHolder.hpp>
|
|
33
|
+
#include <NitroModules/Result.hpp>
|
|
34
|
+
#include <exception>
|
|
35
|
+
#include <functional>
|
|
36
|
+
#include <memory>
|
|
37
|
+
#include <optional>
|
|
38
|
+
#include <string>
|
|
39
|
+
#include <variant>
|
|
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::alipush::bridge::swift {
|
|
47
|
+
|
|
48
|
+
// pragma MARK: std::shared_ptr<Promise<void>>
|
|
49
|
+
/**
|
|
50
|
+
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
51
|
+
*/
|
|
52
|
+
using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
|
|
53
|
+
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
|
|
54
|
+
return Promise<void>::create();
|
|
55
|
+
}
|
|
56
|
+
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
|
|
57
|
+
return PromiseHolder<void>(std::move(promise));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// pragma MARK: std::function<void()>
|
|
61
|
+
/**
|
|
62
|
+
* Specialized version of `std::function<void()>`.
|
|
63
|
+
*/
|
|
64
|
+
using Func_void = std::function<void()>;
|
|
65
|
+
/**
|
|
66
|
+
* Wrapper class for a `std::function<void()>`, this can be used from Swift.
|
|
67
|
+
*/
|
|
68
|
+
class Func_void_Wrapper final {
|
|
69
|
+
public:
|
|
70
|
+
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
|
|
71
|
+
inline void call() const noexcept {
|
|
72
|
+
_function->operator()();
|
|
73
|
+
}
|
|
74
|
+
private:
|
|
75
|
+
std::unique_ptr<std::function<void()>> _function;
|
|
76
|
+
} SWIFT_NONCOPYABLE;
|
|
77
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
78
|
+
inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
|
|
79
|
+
return Func_void_Wrapper(std::move(value));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
83
|
+
/**
|
|
84
|
+
* Specialized version of `std::function<void(const std::exception_ptr&)>`.
|
|
85
|
+
*/
|
|
86
|
+
using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
|
|
87
|
+
/**
|
|
88
|
+
* Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
|
|
89
|
+
*/
|
|
90
|
+
class Func_void_std__exception_ptr_Wrapper final {
|
|
91
|
+
public:
|
|
92
|
+
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))) {}
|
|
93
|
+
inline void call(std::exception_ptr error) const noexcept {
|
|
94
|
+
_function->operator()(error);
|
|
95
|
+
}
|
|
96
|
+
private:
|
|
97
|
+
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
98
|
+
} SWIFT_NONCOPYABLE;
|
|
99
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
100
|
+
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
|
|
101
|
+
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// pragma MARK: std::shared_ptr<Promise<std::string>>
|
|
105
|
+
/**
|
|
106
|
+
* Specialized version of `std::shared_ptr<Promise<std::string>>`.
|
|
107
|
+
*/
|
|
108
|
+
using std__shared_ptr_Promise_std__string__ = std::shared_ptr<Promise<std::string>>;
|
|
109
|
+
inline std::shared_ptr<Promise<std::string>> create_std__shared_ptr_Promise_std__string__() noexcept {
|
|
110
|
+
return Promise<std::string>::create();
|
|
111
|
+
}
|
|
112
|
+
inline PromiseHolder<std::string> wrap_std__shared_ptr_Promise_std__string__(std::shared_ptr<Promise<std::string>> promise) noexcept {
|
|
113
|
+
return PromiseHolder<std::string>(std::move(promise));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// pragma MARK: std::function<void(const std::string& /* result */)>
|
|
117
|
+
/**
|
|
118
|
+
* Specialized version of `std::function<void(const std::string&)>`.
|
|
119
|
+
*/
|
|
120
|
+
using Func_void_std__string = std::function<void(const std::string& /* result */)>;
|
|
121
|
+
/**
|
|
122
|
+
* Wrapper class for a `std::function<void(const std::string& / * result * /)>`, this can be used from Swift.
|
|
123
|
+
*/
|
|
124
|
+
class Func_void_std__string_Wrapper final {
|
|
125
|
+
public:
|
|
126
|
+
explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::string& /* result */)>>(std::move(func))) {}
|
|
127
|
+
inline void call(std::string result) const noexcept {
|
|
128
|
+
_function->operator()(result);
|
|
129
|
+
}
|
|
130
|
+
private:
|
|
131
|
+
std::unique_ptr<std::function<void(const std::string& /* result */)>> _function;
|
|
132
|
+
} SWIFT_NONCOPYABLE;
|
|
133
|
+
Func_void_std__string create_Func_void_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
134
|
+
inline Func_void_std__string_Wrapper wrap_Func_void_std__string(Func_void_std__string value) noexcept {
|
|
135
|
+
return Func_void_std__string_Wrapper(std::move(value));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// pragma MARK: std::vector<std::string>
|
|
139
|
+
/**
|
|
140
|
+
* Specialized version of `std::vector<std::string>`.
|
|
141
|
+
*/
|
|
142
|
+
using std__vector_std__string_ = std::vector<std::string>;
|
|
143
|
+
inline std::vector<std::string> create_std__vector_std__string_(size_t size) noexcept {
|
|
144
|
+
std::vector<std::string> vector;
|
|
145
|
+
vector.reserve(size);
|
|
146
|
+
return vector;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// pragma MARK: std::variant<nitro::NullType, std::string>
|
|
150
|
+
/**
|
|
151
|
+
* Wrapper struct for `std::variant<nitro::NullType, std::string>`.
|
|
152
|
+
* std::variant cannot be used in Swift because of a Swift bug.
|
|
153
|
+
* Not even specializing it works. So we create a wrapper struct.
|
|
154
|
+
*/
|
|
155
|
+
struct std__variant_nitro__NullType__std__string_ final {
|
|
156
|
+
std::variant<nitro::NullType, std::string> variant;
|
|
157
|
+
std__variant_nitro__NullType__std__string_(std::variant<nitro::NullType, std::string> variant): variant(variant) { }
|
|
158
|
+
operator std::variant<nitro::NullType, std::string>() const noexcept {
|
|
159
|
+
return variant;
|
|
160
|
+
}
|
|
161
|
+
inline size_t index() const noexcept {
|
|
162
|
+
return variant.index();
|
|
163
|
+
}
|
|
164
|
+
inline nitro::NullType get_0() const noexcept {
|
|
165
|
+
return std::get<0>(variant);
|
|
166
|
+
}
|
|
167
|
+
inline std::string get_1() const noexcept {
|
|
168
|
+
return std::get<1>(variant);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
inline std__variant_nitro__NullType__std__string_ create_std__variant_nitro__NullType__std__string_(nitro::NullType value) noexcept {
|
|
172
|
+
return std__variant_nitro__NullType__std__string_(value);
|
|
173
|
+
}
|
|
174
|
+
inline std__variant_nitro__NullType__std__string_ create_std__variant_nitro__NullType__std__string_(const std::string& value) noexcept {
|
|
175
|
+
return std__variant_nitro__NullType__std__string_(value);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// pragma MARK: std::optional<std::variant<nitro::NullType, std::string>>
|
|
179
|
+
/**
|
|
180
|
+
* Specialized version of `std::optional<std::variant<nitro::NullType, std::string>>`.
|
|
181
|
+
*/
|
|
182
|
+
using std__optional_std__variant_nitro__NullType__std__string__ = std::optional<std::variant<nitro::NullType, std::string>>;
|
|
183
|
+
inline std::optional<std::variant<nitro::NullType, std::string>> create_std__optional_std__variant_nitro__NullType__std__string__(const std::variant<nitro::NullType, std::string>& value) noexcept {
|
|
184
|
+
return std::optional<std::variant<nitro::NullType, std::string>>(value);
|
|
185
|
+
}
|
|
186
|
+
inline bool has_value_std__optional_std__variant_nitro__NullType__std__string__(const std::optional<std::variant<nitro::NullType, std::string>>& optional) noexcept {
|
|
187
|
+
return optional.has_value();
|
|
188
|
+
}
|
|
189
|
+
inline std::variant<nitro::NullType, std::string> get_std__optional_std__variant_nitro__NullType__std__string__(const std::optional<std::variant<nitro::NullType, std::string>>& optional) noexcept {
|
|
190
|
+
return optional.value();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// pragma MARK: std::shared_ptr<Promise<double>>
|
|
194
|
+
/**
|
|
195
|
+
* Specialized version of `std::shared_ptr<Promise<double>>`.
|
|
196
|
+
*/
|
|
197
|
+
using std__shared_ptr_Promise_double__ = std::shared_ptr<Promise<double>>;
|
|
198
|
+
inline std::shared_ptr<Promise<double>> create_std__shared_ptr_Promise_double__() noexcept {
|
|
199
|
+
return Promise<double>::create();
|
|
200
|
+
}
|
|
201
|
+
inline PromiseHolder<double> wrap_std__shared_ptr_Promise_double__(std::shared_ptr<Promise<double>> promise) noexcept {
|
|
202
|
+
return PromiseHolder<double>(std::move(promise));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// pragma MARK: std::function<void(double /* result */)>
|
|
206
|
+
/**
|
|
207
|
+
* Specialized version of `std::function<void(double)>`.
|
|
208
|
+
*/
|
|
209
|
+
using Func_void_double = std::function<void(double /* result */)>;
|
|
210
|
+
/**
|
|
211
|
+
* Wrapper class for a `std::function<void(double / * result * /)>`, this can be used from Swift.
|
|
212
|
+
*/
|
|
213
|
+
class Func_void_double_Wrapper final {
|
|
214
|
+
public:
|
|
215
|
+
explicit Func_void_double_Wrapper(std::function<void(double /* result */)>&& func): _function(std::make_unique<std::function<void(double /* result */)>>(std::move(func))) {}
|
|
216
|
+
inline void call(double result) const noexcept {
|
|
217
|
+
_function->operator()(result);
|
|
218
|
+
}
|
|
219
|
+
private:
|
|
220
|
+
std::unique_ptr<std::function<void(double /* result */)>> _function;
|
|
221
|
+
} SWIFT_NONCOPYABLE;
|
|
222
|
+
Func_void_double create_Func_void_double(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
223
|
+
inline Func_void_double_Wrapper wrap_Func_void_double(Func_void_double value) noexcept {
|
|
224
|
+
return Func_void_double_Wrapper(std::move(value));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// pragma MARK: std::optional<std::string>
|
|
228
|
+
/**
|
|
229
|
+
* Specialized version of `std::optional<std::string>`.
|
|
230
|
+
*/
|
|
231
|
+
using std__optional_std__string_ = std::optional<std::string>;
|
|
232
|
+
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
|
|
233
|
+
return std::optional<std::string>(value);
|
|
234
|
+
}
|
|
235
|
+
inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
236
|
+
return optional.has_value();
|
|
237
|
+
}
|
|
238
|
+
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
239
|
+
return optional.value();
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// pragma MARK: std::optional<double>
|
|
243
|
+
/**
|
|
244
|
+
* Specialized version of `std::optional<double>`.
|
|
245
|
+
*/
|
|
246
|
+
using std__optional_double_ = std::optional<double>;
|
|
247
|
+
inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
|
|
248
|
+
return std::optional<double>(value);
|
|
249
|
+
}
|
|
250
|
+
inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
251
|
+
return optional.has_value();
|
|
252
|
+
}
|
|
253
|
+
inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
254
|
+
return optional.value();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// pragma MARK: std::optional<std::shared_ptr<AnyMap>>
|
|
258
|
+
/**
|
|
259
|
+
* Specialized version of `std::optional<std::shared_ptr<AnyMap>>`.
|
|
260
|
+
*/
|
|
261
|
+
using std__optional_std__shared_ptr_AnyMap__ = std::optional<std::shared_ptr<AnyMap>>;
|
|
262
|
+
inline std::optional<std::shared_ptr<AnyMap>> create_std__optional_std__shared_ptr_AnyMap__(const std::shared_ptr<AnyMap>& value) noexcept {
|
|
263
|
+
return std::optional<std::shared_ptr<AnyMap>>(value);
|
|
264
|
+
}
|
|
265
|
+
inline bool has_value_std__optional_std__shared_ptr_AnyMap__(const std::optional<std::shared_ptr<AnyMap>>& optional) noexcept {
|
|
266
|
+
return optional.has_value();
|
|
267
|
+
}
|
|
268
|
+
inline std::shared_ptr<AnyMap> get_std__optional_std__shared_ptr_AnyMap__(const std::optional<std::shared_ptr<AnyMap>>& optional) noexcept {
|
|
269
|
+
return optional.value();
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// pragma MARK: std::optional<AliPushMessageType>
|
|
273
|
+
/**
|
|
274
|
+
* Specialized version of `std::optional<AliPushMessageType>`.
|
|
275
|
+
*/
|
|
276
|
+
using std__optional_AliPushMessageType_ = std::optional<AliPushMessageType>;
|
|
277
|
+
inline std::optional<AliPushMessageType> create_std__optional_AliPushMessageType_(const AliPushMessageType& value) noexcept {
|
|
278
|
+
return std::optional<AliPushMessageType>(value);
|
|
279
|
+
}
|
|
280
|
+
inline bool has_value_std__optional_AliPushMessageType_(const std::optional<AliPushMessageType>& optional) noexcept {
|
|
281
|
+
return optional.has_value();
|
|
282
|
+
}
|
|
283
|
+
inline AliPushMessageType get_std__optional_AliPushMessageType_(const std::optional<AliPushMessageType>& optional) noexcept {
|
|
284
|
+
return optional.value();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// pragma MARK: std::optional<AliPushAppState>
|
|
288
|
+
/**
|
|
289
|
+
* Specialized version of `std::optional<AliPushAppState>`.
|
|
290
|
+
*/
|
|
291
|
+
using std__optional_AliPushAppState_ = std::optional<AliPushAppState>;
|
|
292
|
+
inline std::optional<AliPushAppState> create_std__optional_AliPushAppState_(const AliPushAppState& value) noexcept {
|
|
293
|
+
return std::optional<AliPushAppState>(value);
|
|
294
|
+
}
|
|
295
|
+
inline bool has_value_std__optional_AliPushAppState_(const std::optional<AliPushAppState>& optional) noexcept {
|
|
296
|
+
return optional.has_value();
|
|
297
|
+
}
|
|
298
|
+
inline AliPushAppState get_std__optional_AliPushAppState_(const std::optional<AliPushAppState>& optional) noexcept {
|
|
299
|
+
return optional.value();
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// pragma MARK: std::variant<double, std::string>
|
|
303
|
+
/**
|
|
304
|
+
* Wrapper struct for `std::variant<double, std::string>`.
|
|
305
|
+
* std::variant cannot be used in Swift because of a Swift bug.
|
|
306
|
+
* Not even specializing it works. So we create a wrapper struct.
|
|
307
|
+
*/
|
|
308
|
+
struct std__variant_double__std__string_ final {
|
|
309
|
+
std::variant<double, std::string> variant;
|
|
310
|
+
std__variant_double__std__string_(std::variant<double, std::string> variant): variant(variant) { }
|
|
311
|
+
operator std::variant<double, std::string>() const noexcept {
|
|
312
|
+
return variant;
|
|
313
|
+
}
|
|
314
|
+
inline size_t index() const noexcept {
|
|
315
|
+
return variant.index();
|
|
316
|
+
}
|
|
317
|
+
inline double get_0() const noexcept {
|
|
318
|
+
return std::get<0>(variant);
|
|
319
|
+
}
|
|
320
|
+
inline std::string get_1() const noexcept {
|
|
321
|
+
return std::get<1>(variant);
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
inline std__variant_double__std__string_ create_std__variant_double__std__string_(double value) noexcept {
|
|
325
|
+
return std__variant_double__std__string_(value);
|
|
326
|
+
}
|
|
327
|
+
inline std__variant_double__std__string_ create_std__variant_double__std__string_(const std::string& value) noexcept {
|
|
328
|
+
return std__variant_double__std__string_(value);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// pragma MARK: std::optional<std::variant<double, std::string>>
|
|
332
|
+
/**
|
|
333
|
+
* Specialized version of `std::optional<std::variant<double, std::string>>`.
|
|
334
|
+
*/
|
|
335
|
+
using std__optional_std__variant_double__std__string__ = std::optional<std::variant<double, std::string>>;
|
|
336
|
+
inline std::optional<std::variant<double, std::string>> create_std__optional_std__variant_double__std__string__(const std::variant<double, std::string>& value) noexcept {
|
|
337
|
+
return std::optional<std::variant<double, std::string>>(value);
|
|
338
|
+
}
|
|
339
|
+
inline bool has_value_std__optional_std__variant_double__std__string__(const std::optional<std::variant<double, std::string>>& optional) noexcept {
|
|
340
|
+
return optional.has_value();
|
|
341
|
+
}
|
|
342
|
+
inline std::variant<double, std::string> get_std__optional_std__variant_double__std__string__(const std::optional<std::variant<double, std::string>>& optional) noexcept {
|
|
343
|
+
return optional.value();
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// pragma MARK: std::variant<nitro::NullType, AliPushMessage>
|
|
347
|
+
/**
|
|
348
|
+
* Wrapper struct for `std::variant<nitro::NullType, AliPushMessage>`.
|
|
349
|
+
* std::variant cannot be used in Swift because of a Swift bug.
|
|
350
|
+
* Not even specializing it works. So we create a wrapper struct.
|
|
351
|
+
*/
|
|
352
|
+
struct std__variant_nitro__NullType__AliPushMessage_ final {
|
|
353
|
+
std::variant<nitro::NullType, AliPushMessage> variant;
|
|
354
|
+
std__variant_nitro__NullType__AliPushMessage_(std::variant<nitro::NullType, AliPushMessage> variant): variant(variant) { }
|
|
355
|
+
operator std::variant<nitro::NullType, AliPushMessage>() const noexcept {
|
|
356
|
+
return variant;
|
|
357
|
+
}
|
|
358
|
+
inline size_t index() const noexcept {
|
|
359
|
+
return variant.index();
|
|
360
|
+
}
|
|
361
|
+
inline nitro::NullType get_0() const noexcept {
|
|
362
|
+
return std::get<0>(variant);
|
|
363
|
+
}
|
|
364
|
+
inline AliPushMessage get_1() const noexcept {
|
|
365
|
+
return std::get<1>(variant);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
inline std__variant_nitro__NullType__AliPushMessage_ create_std__variant_nitro__NullType__AliPushMessage_(nitro::NullType value) noexcept {
|
|
369
|
+
return std__variant_nitro__NullType__AliPushMessage_(value);
|
|
370
|
+
}
|
|
371
|
+
inline std__variant_nitro__NullType__AliPushMessage_ create_std__variant_nitro__NullType__AliPushMessage_(const AliPushMessage& value) noexcept {
|
|
372
|
+
return std__variant_nitro__NullType__AliPushMessage_(value);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// pragma MARK: std::shared_ptr<Promise<std::variant<nitro::NullType, AliPushMessage>>>
|
|
376
|
+
/**
|
|
377
|
+
* Specialized version of `std::shared_ptr<Promise<std::variant<nitro::NullType, AliPushMessage>>>`.
|
|
378
|
+
*/
|
|
379
|
+
using std__shared_ptr_Promise_std__variant_nitro__NullType__AliPushMessage___ = std::shared_ptr<Promise<std::variant<nitro::NullType, AliPushMessage>>>;
|
|
380
|
+
inline std::shared_ptr<Promise<std::variant<nitro::NullType, AliPushMessage>>> create_std__shared_ptr_Promise_std__variant_nitro__NullType__AliPushMessage___() noexcept {
|
|
381
|
+
return Promise<std::variant<nitro::NullType, AliPushMessage>>::create();
|
|
382
|
+
}
|
|
383
|
+
inline PromiseHolder<std::variant<nitro::NullType, AliPushMessage>> wrap_std__shared_ptr_Promise_std__variant_nitro__NullType__AliPushMessage___(std::shared_ptr<Promise<std::variant<nitro::NullType, AliPushMessage>>> promise) noexcept {
|
|
384
|
+
return PromiseHolder<std::variant<nitro::NullType, AliPushMessage>>(std::move(promise));
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// pragma MARK: std::function<void(const std::variant<nitro::NullType, AliPushMessage>& /* result */)>
|
|
388
|
+
/**
|
|
389
|
+
* Specialized version of `std::function<void(const std::variant<nitro::NullType, AliPushMessage>&)>`.
|
|
390
|
+
*/
|
|
391
|
+
using Func_void_std__variant_nitro__NullType__AliPushMessage_ = std::function<void(const std::variant<nitro::NullType, AliPushMessage>& /* result */)>;
|
|
392
|
+
/**
|
|
393
|
+
* Wrapper class for a `std::function<void(const std::variant<nitro::NullType, AliPushMessage>& / * result * /)>`, this can be used from Swift.
|
|
394
|
+
*/
|
|
395
|
+
class Func_void_std__variant_nitro__NullType__AliPushMessage__Wrapper final {
|
|
396
|
+
public:
|
|
397
|
+
explicit Func_void_std__variant_nitro__NullType__AliPushMessage__Wrapper(std::function<void(const std::variant<nitro::NullType, AliPushMessage>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::variant<nitro::NullType, AliPushMessage>& /* result */)>>(std::move(func))) {}
|
|
398
|
+
inline void call(std::variant<nitro::NullType, AliPushMessage> result) const noexcept {
|
|
399
|
+
_function->operator()(result);
|
|
400
|
+
}
|
|
401
|
+
private:
|
|
402
|
+
std::unique_ptr<std::function<void(const std::variant<nitro::NullType, AliPushMessage>& /* result */)>> _function;
|
|
403
|
+
} SWIFT_NONCOPYABLE;
|
|
404
|
+
Func_void_std__variant_nitro__NullType__AliPushMessage_ create_Func_void_std__variant_nitro__NullType__AliPushMessage_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
405
|
+
inline Func_void_std__variant_nitro__NullType__AliPushMessage__Wrapper wrap_Func_void_std__variant_nitro__NullType__AliPushMessage_(Func_void_std__variant_nitro__NullType__AliPushMessage_ value) noexcept {
|
|
406
|
+
return Func_void_std__variant_nitro__NullType__AliPushMessage__Wrapper(std::move(value));
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// pragma MARK: std::shared_ptr<Promise<bool>>
|
|
410
|
+
/**
|
|
411
|
+
* Specialized version of `std::shared_ptr<Promise<bool>>`.
|
|
412
|
+
*/
|
|
413
|
+
using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
|
|
414
|
+
inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
|
|
415
|
+
return Promise<bool>::create();
|
|
416
|
+
}
|
|
417
|
+
inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
|
|
418
|
+
return PromiseHolder<bool>(std::move(promise));
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// pragma MARK: std::function<void(bool /* result */)>
|
|
422
|
+
/**
|
|
423
|
+
* Specialized version of `std::function<void(bool)>`.
|
|
424
|
+
*/
|
|
425
|
+
using Func_void_bool = std::function<void(bool /* result */)>;
|
|
426
|
+
/**
|
|
427
|
+
* Wrapper class for a `std::function<void(bool / * result * /)>`, this can be used from Swift.
|
|
428
|
+
*/
|
|
429
|
+
class Func_void_bool_Wrapper final {
|
|
430
|
+
public:
|
|
431
|
+
explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
|
|
432
|
+
inline void call(bool result) const noexcept {
|
|
433
|
+
_function->operator()(result);
|
|
434
|
+
}
|
|
435
|
+
private:
|
|
436
|
+
std::unique_ptr<std::function<void(bool /* result */)>> _function;
|
|
437
|
+
} SWIFT_NONCOPYABLE;
|
|
438
|
+
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
439
|
+
inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
|
|
440
|
+
return Func_void_bool_Wrapper(std::move(value));
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
// pragma MARK: std::function<void(const AliPushMessage& /* message */)>
|
|
444
|
+
/**
|
|
445
|
+
* Specialized version of `std::function<void(const AliPushMessage&)>`.
|
|
446
|
+
*/
|
|
447
|
+
using Func_void_AliPushMessage = std::function<void(const AliPushMessage& /* message */)>;
|
|
448
|
+
/**
|
|
449
|
+
* Wrapper class for a `std::function<void(const AliPushMessage& / * message * /)>`, this can be used from Swift.
|
|
450
|
+
*/
|
|
451
|
+
class Func_void_AliPushMessage_Wrapper final {
|
|
452
|
+
public:
|
|
453
|
+
explicit Func_void_AliPushMessage_Wrapper(std::function<void(const AliPushMessage& /* message */)>&& func): _function(std::make_unique<std::function<void(const AliPushMessage& /* message */)>>(std::move(func))) {}
|
|
454
|
+
inline void call(AliPushMessage message) const noexcept {
|
|
455
|
+
_function->operator()(message);
|
|
456
|
+
}
|
|
457
|
+
private:
|
|
458
|
+
std::unique_ptr<std::function<void(const AliPushMessage& /* message */)>> _function;
|
|
459
|
+
} SWIFT_NONCOPYABLE;
|
|
460
|
+
Func_void_AliPushMessage create_Func_void_AliPushMessage(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
461
|
+
inline Func_void_AliPushMessage_Wrapper wrap_Func_void_AliPushMessage(Func_void_AliPushMessage value) noexcept {
|
|
462
|
+
return Func_void_AliPushMessage_Wrapper(std::move(value));
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// pragma MARK: std::shared_ptr<HybridAliPushPluginSpec>
|
|
466
|
+
/**
|
|
467
|
+
* Specialized version of `std::shared_ptr<HybridAliPushPluginSpec>`.
|
|
468
|
+
*/
|
|
469
|
+
using std__shared_ptr_HybridAliPushPluginSpec_ = std::shared_ptr<HybridAliPushPluginSpec>;
|
|
470
|
+
std::shared_ptr<HybridAliPushPluginSpec> create_std__shared_ptr_HybridAliPushPluginSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
471
|
+
void* NON_NULL get_std__shared_ptr_HybridAliPushPluginSpec_(std__shared_ptr_HybridAliPushPluginSpec_ cppType);
|
|
472
|
+
|
|
473
|
+
// pragma MARK: std::weak_ptr<HybridAliPushPluginSpec>
|
|
474
|
+
using std__weak_ptr_HybridAliPushPluginSpec_ = std::weak_ptr<HybridAliPushPluginSpec>;
|
|
475
|
+
inline std__weak_ptr_HybridAliPushPluginSpec_ weakify_std__shared_ptr_HybridAliPushPluginSpec_(const std::shared_ptr<HybridAliPushPluginSpec>& strong) noexcept { return strong; }
|
|
476
|
+
|
|
477
|
+
// pragma MARK: Result<std::shared_ptr<Promise<void>>>
|
|
478
|
+
using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
|
|
479
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
|
|
480
|
+
return Result<std::shared_ptr<Promise<void>>>::withValue(value);
|
|
481
|
+
}
|
|
482
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
|
|
483
|
+
return Result<std::shared_ptr<Promise<void>>>::withError(error);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::string>>>
|
|
487
|
+
using Result_std__shared_ptr_Promise_std__string___ = Result<std::shared_ptr<Promise<std::string>>>;
|
|
488
|
+
inline Result_std__shared_ptr_Promise_std__string___ create_Result_std__shared_ptr_Promise_std__string___(const std::shared_ptr<Promise<std::string>>& value) noexcept {
|
|
489
|
+
return Result<std::shared_ptr<Promise<std::string>>>::withValue(value);
|
|
490
|
+
}
|
|
491
|
+
inline Result_std__shared_ptr_Promise_std__string___ create_Result_std__shared_ptr_Promise_std__string___(const std::exception_ptr& error) noexcept {
|
|
492
|
+
return Result<std::shared_ptr<Promise<std::string>>>::withError(error);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// pragma MARK: Result<std::shared_ptr<Promise<double>>>
|
|
496
|
+
using Result_std__shared_ptr_Promise_double___ = Result<std::shared_ptr<Promise<double>>>;
|
|
497
|
+
inline Result_std__shared_ptr_Promise_double___ create_Result_std__shared_ptr_Promise_double___(const std::shared_ptr<Promise<double>>& value) noexcept {
|
|
498
|
+
return Result<std::shared_ptr<Promise<double>>>::withValue(value);
|
|
499
|
+
}
|
|
500
|
+
inline Result_std__shared_ptr_Promise_double___ create_Result_std__shared_ptr_Promise_double___(const std::exception_ptr& error) noexcept {
|
|
501
|
+
return Result<std::shared_ptr<Promise<double>>>::withError(error);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::variant<nitro::NullType, AliPushMessage>>>>
|
|
505
|
+
using Result_std__shared_ptr_Promise_std__variant_nitro__NullType__AliPushMessage____ = Result<std::shared_ptr<Promise<std::variant<nitro::NullType, AliPushMessage>>>>;
|
|
506
|
+
inline Result_std__shared_ptr_Promise_std__variant_nitro__NullType__AliPushMessage____ create_Result_std__shared_ptr_Promise_std__variant_nitro__NullType__AliPushMessage____(const std::shared_ptr<Promise<std::variant<nitro::NullType, AliPushMessage>>>& value) noexcept {
|
|
507
|
+
return Result<std::shared_ptr<Promise<std::variant<nitro::NullType, AliPushMessage>>>>::withValue(value);
|
|
508
|
+
}
|
|
509
|
+
inline Result_std__shared_ptr_Promise_std__variant_nitro__NullType__AliPushMessage____ create_Result_std__shared_ptr_Promise_std__variant_nitro__NullType__AliPushMessage____(const std::exception_ptr& error) noexcept {
|
|
510
|
+
return Result<std::shared_ptr<Promise<std::variant<nitro::NullType, AliPushMessage>>>>::withError(error);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// pragma MARK: Result<std::shared_ptr<Promise<bool>>>
|
|
514
|
+
using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
|
|
515
|
+
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
|
|
516
|
+
return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
|
|
517
|
+
}
|
|
518
|
+
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
|
|
519
|
+
return Result<std::shared_ptr<Promise<bool>>>::withError(error);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// pragma MARK: Result<std::function<void()>>
|
|
523
|
+
using Result_std__function_void____ = Result<std::function<void()>>;
|
|
524
|
+
inline Result_std__function_void____ create_Result_std__function_void____(const std::function<void()>& value) noexcept {
|
|
525
|
+
return Result<std::function<void()>>::withValue(value);
|
|
526
|
+
}
|
|
527
|
+
inline Result_std__function_void____ create_Result_std__function_void____(const std::exception_ptr& error) noexcept {
|
|
528
|
+
return Result<std::function<void()>>::withError(error);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
} // namespace margelo::nitro::alipush::bridge::swift
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroAliPush-Swift-Cxx-Umbrella.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `AliPushAppState` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::alipush { enum class AliPushAppState; }
|
|
13
|
+
// Forward declaration of `AliPushMessageType` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::alipush { enum class AliPushMessageType; }
|
|
15
|
+
// Forward declaration of `AliPushMessage` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::alipush { struct AliPushMessage; }
|
|
17
|
+
// Forward declaration of `HybridAliPushPluginSpec` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::alipush { class HybridAliPushPluginSpec; }
|
|
19
|
+
|
|
20
|
+
// Include C++ defined types
|
|
21
|
+
#include "AliPushAppState.hpp"
|
|
22
|
+
#include "AliPushMessage.hpp"
|
|
23
|
+
#include "AliPushMessageType.hpp"
|
|
24
|
+
#include "HybridAliPushPluginSpec.hpp"
|
|
25
|
+
#include <NitroModules/AnyMap.hpp>
|
|
26
|
+
#include <NitroModules/Null.hpp>
|
|
27
|
+
#include <NitroModules/Promise.hpp>
|
|
28
|
+
#include <NitroModules/Result.hpp>
|
|
29
|
+
#include <exception>
|
|
30
|
+
#include <functional>
|
|
31
|
+
#include <memory>
|
|
32
|
+
#include <optional>
|
|
33
|
+
#include <string>
|
|
34
|
+
#include <variant>
|
|
35
|
+
#include <vector>
|
|
36
|
+
|
|
37
|
+
// C++ helpers for Swift
|
|
38
|
+
#include "NitroAliPush-Swift-Cxx-Bridge.hpp"
|
|
39
|
+
|
|
40
|
+
// Common C++ types used in Swift
|
|
41
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
42
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
43
|
+
#include <NitroModules/RuntimeError.hpp>
|
|
44
|
+
#include <NitroModules/DateToChronoDate.hpp>
|
|
45
|
+
|
|
46
|
+
// Forward declarations of Swift defined types
|
|
47
|
+
// Forward declaration of `HybridAliPushPluginSpec_cxx` to properly resolve imports.
|
|
48
|
+
namespace NitroAliPush { class HybridAliPushPluginSpec_cxx; }
|
|
49
|
+
|
|
50
|
+
// Include Swift defined types
|
|
51
|
+
#if __has_include("NitroAliPush-Swift.h")
|
|
52
|
+
// This header is generated by Xcode/Swift on every app build.
|
|
53
|
+
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "NitroAliPush".
|
|
54
|
+
#include "NitroAliPush-Swift.h"
|
|
55
|
+
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
56
|
+
#elif __has_include(<NitroAliPush/NitroAliPush-Swift.h>)
|
|
57
|
+
#include <NitroAliPush/NitroAliPush-Swift.h>
|
|
58
|
+
#else
|
|
59
|
+
#error NitroAliPush's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "NitroAliPush", and try building the app first.
|
|
60
|
+
#endif
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroAliPushAutolinking.mm
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <NitroModules/HybridObjectRegistry.hpp>
|
|
10
|
+
#import "NitroAliPush-Swift-Cxx-Umbrella.hpp"
|
|
11
|
+
#import <type_traits>
|
|
12
|
+
|
|
13
|
+
#include "HybridAliPushPluginSpecSwift.hpp"
|
|
14
|
+
|
|
15
|
+
@interface NitroAliPushAutolinking : NSObject
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
@implementation NitroAliPushAutolinking
|
|
19
|
+
|
|
20
|
+
+ (void) load {
|
|
21
|
+
using namespace margelo::nitro;
|
|
22
|
+
using namespace margelo::nitro::alipush;
|
|
23
|
+
|
|
24
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
|
+
"AliPushPlugin",
|
|
26
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
+
std::shared_ptr<HybridAliPushPluginSpec> hybridObject = NitroAliPush::NitroAliPushAutolinking::createAliPushPlugin();
|
|
28
|
+
return hybridObject;
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroAliPushAutolinking.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
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
|
|
12
|
+
public final class NitroAliPushAutolinking {
|
|
13
|
+
public typealias bridge = margelo.nitro.alipush.bridge.swift
|
|
14
|
+
|
|
15
|
+
public static func createAliPushPlugin() -> bridge.std__shared_ptr_HybridAliPushPluginSpec_ {
|
|
16
|
+
let hybridObject = HybridAliPushPlugin()
|
|
17
|
+
return { () -> bridge.std__shared_ptr_HybridAliPushPluginSpec_ in
|
|
18
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
19
|
+
return __cxxWrapped.getCxxPart()
|
|
20
|
+
}()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public static func isAliPushPluginRecyclable() -> Bool {
|
|
24
|
+
return HybridAliPushPlugin.self is any RecyclableView.Type
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridAliPushPluginSpecSwift.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridAliPushPluginSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::alipush {
|
|
11
|
+
} // namespace margelo::nitro::alipush
|