@onekeyfe/react-native-device-utils 1.1.19 → 1.1.21

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 (37) hide show
  1. package/ReactNativeDeviceUtils.podspec +1 -0
  2. package/android/build.gradle +5 -0
  3. package/android/src/main/java/com/margelo/nitro/reactnativedeviceutils/ReactNativeDeviceUtils.kt +153 -8
  4. package/ios/ReactNativeDeviceUtils.swift +109 -0
  5. package/lib/typescript/src/ReactNativeDeviceUtils.nitro.d.ts +22 -0
  6. package/lib/typescript/src/ReactNativeDeviceUtils.nitro.d.ts.map +1 -1
  7. package/nitrogen/generated/android/c++/JGooglePlayServicesStatus.hpp +61 -0
  8. package/nitrogen/generated/android/c++/JHybridReactNativeDeviceUtilsSpec.cpp +145 -0
  9. package/nitrogen/generated/android/c++/JHybridReactNativeDeviceUtilsSpec.hpp +9 -0
  10. package/nitrogen/generated/android/c++/JLaunchOptions.hpp +62 -0
  11. package/nitrogen/generated/android/c++/JWebViewPackageInfo.hpp +65 -0
  12. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/GooglePlayServicesStatus.kt +41 -0
  13. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/HybridReactNativeDeviceUtilsSpec.kt +36 -0
  14. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/LaunchOptions.kt +41 -0
  15. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/WebViewPackageInfo.kt +44 -0
  16. package/nitrogen/generated/ios/ReactNativeDeviceUtils-Swift-Cxx-Bridge.cpp +48 -0
  17. package/nitrogen/generated/ios/ReactNativeDeviceUtils-Swift-Cxx-Bridge.hpp +305 -0
  18. package/nitrogen/generated/ios/ReactNativeDeviceUtils-Swift-Cxx-Umbrella.hpp +11 -0
  19. package/nitrogen/generated/ios/c++/HybridReactNativeDeviceUtilsSpecSwift.hpp +81 -0
  20. package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
  21. package/nitrogen/generated/ios/swift/Func_void_GooglePlayServicesStatus.swift +47 -0
  22. package/nitrogen/generated/ios/swift/Func_void_LaunchOptions.swift +47 -0
  23. package/nitrogen/generated/ios/swift/Func_void_WebViewPackageInfo.swift +47 -0
  24. package/nitrogen/generated/ios/swift/Func_void_double.swift +47 -0
  25. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  26. package/nitrogen/generated/ios/swift/GooglePlayServicesStatus.swift +47 -0
  27. package/nitrogen/generated/ios/swift/HybridReactNativeDeviceUtilsSpec.swift +9 -0
  28. package/nitrogen/generated/ios/swift/HybridReactNativeDeviceUtilsSpec_cxx.swift +163 -0
  29. package/nitrogen/generated/ios/swift/LaunchOptions.swift +66 -0
  30. package/nitrogen/generated/ios/swift/WebViewPackageInfo.swift +58 -0
  31. package/nitrogen/generated/shared/c++/GooglePlayServicesStatus.hpp +79 -0
  32. package/nitrogen/generated/shared/c++/HybridReactNativeDeviceUtilsSpec.cpp +9 -0
  33. package/nitrogen/generated/shared/c++/HybridReactNativeDeviceUtilsSpec.hpp +19 -0
  34. package/nitrogen/generated/shared/c++/LaunchOptions.hpp +80 -0
  35. package/nitrogen/generated/shared/c++/WebViewPackageInfo.hpp +83 -0
  36. package/package.json +1 -1
  37. package/src/ReactNativeDeviceUtils.nitro.ts +31 -0
@@ -10,8 +10,14 @@
10
10
  // Forward declarations of C++ defined types
11
11
  // Forward declaration of `DualScreenInfoRect` to properly resolve imports.
12
12
  namespace margelo::nitro::reactnativedeviceutils { struct DualScreenInfoRect; }
13
+ // Forward declaration of `GooglePlayServicesStatus` to properly resolve imports.
14
+ namespace margelo::nitro::reactnativedeviceutils { struct GooglePlayServicesStatus; }
13
15
  // Forward declaration of `HybridReactNativeDeviceUtilsSpec` to properly resolve imports.
14
16
  namespace margelo::nitro::reactnativedeviceutils { class HybridReactNativeDeviceUtilsSpec; }
17
+ // Forward declaration of `LaunchOptions` to properly resolve imports.
18
+ namespace margelo::nitro::reactnativedeviceutils { struct LaunchOptions; }
19
+ // Forward declaration of `WebViewPackageInfo` to properly resolve imports.
20
+ namespace margelo::nitro::reactnativedeviceutils { struct WebViewPackageInfo; }
15
21
 
16
22
  // Forward declarations of Swift defined types
17
23
  // Forward declaration of `HybridReactNativeDeviceUtilsSpec_cxx` to properly resolve imports.
@@ -19,13 +25,18 @@ namespace ReactNativeDeviceUtils { class HybridReactNativeDeviceUtilsSpec_cxx; }
19
25
 
20
26
  // Include C++ defined types
21
27
  #include "DualScreenInfoRect.hpp"
28
+ #include "GooglePlayServicesStatus.hpp"
22
29
  #include "HybridReactNativeDeviceUtilsSpec.hpp"
30
+ #include "LaunchOptions.hpp"
31
+ #include "WebViewPackageInfo.hpp"
23
32
  #include <NitroModules/Promise.hpp>
24
33
  #include <NitroModules/PromiseHolder.hpp>
25
34
  #include <NitroModules/Result.hpp>
26
35
  #include <exception>
27
36
  #include <functional>
28
37
  #include <memory>
38
+ #include <optional>
39
+ #include <string>
29
40
  #include <vector>
30
41
 
31
42
  /**
@@ -157,6 +168,237 @@ namespace margelo::nitro::reactnativedeviceutils::bridge::swift {
157
168
  return Func_void_bool_Wrapper(std::move(value));
158
169
  }
159
170
 
171
+ // pragma MARK: std::optional<std::string>
172
+ /**
173
+ * Specialized version of `std::optional<std::string>`.
174
+ */
175
+ using std__optional_std__string_ = std::optional<std::string>;
176
+ inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
177
+ return std::optional<std::string>(value);
178
+ }
179
+ inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
180
+ return optional.has_value();
181
+ }
182
+ inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
183
+ return *optional;
184
+ }
185
+
186
+ // pragma MARK: std::shared_ptr<Promise<LaunchOptions>>
187
+ /**
188
+ * Specialized version of `std::shared_ptr<Promise<LaunchOptions>>`.
189
+ */
190
+ using std__shared_ptr_Promise_LaunchOptions__ = std::shared_ptr<Promise<LaunchOptions>>;
191
+ inline std::shared_ptr<Promise<LaunchOptions>> create_std__shared_ptr_Promise_LaunchOptions__() noexcept {
192
+ return Promise<LaunchOptions>::create();
193
+ }
194
+ inline PromiseHolder<LaunchOptions> wrap_std__shared_ptr_Promise_LaunchOptions__(std::shared_ptr<Promise<LaunchOptions>> promise) noexcept {
195
+ return PromiseHolder<LaunchOptions>(std::move(promise));
196
+ }
197
+
198
+ // pragma MARK: std::function<void(const LaunchOptions& /* result */)>
199
+ /**
200
+ * Specialized version of `std::function<void(const LaunchOptions&)>`.
201
+ */
202
+ using Func_void_LaunchOptions = std::function<void(const LaunchOptions& /* result */)>;
203
+ /**
204
+ * Wrapper class for a `std::function<void(const LaunchOptions& / * result * /)>`, this can be used from Swift.
205
+ */
206
+ class Func_void_LaunchOptions_Wrapper final {
207
+ public:
208
+ explicit Func_void_LaunchOptions_Wrapper(std::function<void(const LaunchOptions& /* result */)>&& func): _function(std::make_unique<std::function<void(const LaunchOptions& /* result */)>>(std::move(func))) {}
209
+ inline void call(LaunchOptions result) const noexcept {
210
+ _function->operator()(result);
211
+ }
212
+ private:
213
+ std::unique_ptr<std::function<void(const LaunchOptions& /* result */)>> _function;
214
+ } SWIFT_NONCOPYABLE;
215
+ Func_void_LaunchOptions create_Func_void_LaunchOptions(void* NON_NULL swiftClosureWrapper) noexcept;
216
+ inline Func_void_LaunchOptions_Wrapper wrap_Func_void_LaunchOptions(Func_void_LaunchOptions value) noexcept {
217
+ return Func_void_LaunchOptions_Wrapper(std::move(value));
218
+ }
219
+
220
+ // pragma MARK: std::shared_ptr<Promise<bool>>
221
+ /**
222
+ * Specialized version of `std::shared_ptr<Promise<bool>>`.
223
+ */
224
+ using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
225
+ inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
226
+ return Promise<bool>::create();
227
+ }
228
+ inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
229
+ return PromiseHolder<bool>(std::move(promise));
230
+ }
231
+
232
+ // pragma MARK: std::shared_ptr<Promise<std::string>>
233
+ /**
234
+ * Specialized version of `std::shared_ptr<Promise<std::string>>`.
235
+ */
236
+ using std__shared_ptr_Promise_std__string__ = std::shared_ptr<Promise<std::string>>;
237
+ inline std::shared_ptr<Promise<std::string>> create_std__shared_ptr_Promise_std__string__() noexcept {
238
+ return Promise<std::string>::create();
239
+ }
240
+ inline PromiseHolder<std::string> wrap_std__shared_ptr_Promise_std__string__(std::shared_ptr<Promise<std::string>> promise) noexcept {
241
+ return PromiseHolder<std::string>(std::move(promise));
242
+ }
243
+
244
+ // pragma MARK: std::function<void(const std::string& /* result */)>
245
+ /**
246
+ * Specialized version of `std::function<void(const std::string&)>`.
247
+ */
248
+ using Func_void_std__string = std::function<void(const std::string& /* result */)>;
249
+ /**
250
+ * Wrapper class for a `std::function<void(const std::string& / * result * /)>`, this can be used from Swift.
251
+ */
252
+ class Func_void_std__string_Wrapper final {
253
+ public:
254
+ 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))) {}
255
+ inline void call(std::string result) const noexcept {
256
+ _function->operator()(result);
257
+ }
258
+ private:
259
+ std::unique_ptr<std::function<void(const std::string& /* result */)>> _function;
260
+ } SWIFT_NONCOPYABLE;
261
+ Func_void_std__string create_Func_void_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
262
+ inline Func_void_std__string_Wrapper wrap_Func_void_std__string(Func_void_std__string value) noexcept {
263
+ return Func_void_std__string_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::shared_ptr<Promise<double>>
301
+ /**
302
+ * Specialized version of `std::shared_ptr<Promise<double>>`.
303
+ */
304
+ using std__shared_ptr_Promise_double__ = std::shared_ptr<Promise<double>>;
305
+ inline std::shared_ptr<Promise<double>> create_std__shared_ptr_Promise_double__() noexcept {
306
+ return Promise<double>::create();
307
+ }
308
+ inline PromiseHolder<double> wrap_std__shared_ptr_Promise_double__(std::shared_ptr<Promise<double>> promise) noexcept {
309
+ return PromiseHolder<double>(std::move(promise));
310
+ }
311
+
312
+ // pragma MARK: std::function<void(double /* result */)>
313
+ /**
314
+ * Specialized version of `std::function<void(double)>`.
315
+ */
316
+ using Func_void_double = std::function<void(double /* result */)>;
317
+ /**
318
+ * Wrapper class for a `std::function<void(double / * result * /)>`, this can be used from Swift.
319
+ */
320
+ class Func_void_double_Wrapper final {
321
+ public:
322
+ explicit Func_void_double_Wrapper(std::function<void(double /* result */)>&& func): _function(std::make_unique<std::function<void(double /* result */)>>(std::move(func))) {}
323
+ inline void call(double result) const noexcept {
324
+ _function->operator()(result);
325
+ }
326
+ private:
327
+ std::unique_ptr<std::function<void(double /* result */)>> _function;
328
+ } SWIFT_NONCOPYABLE;
329
+ Func_void_double create_Func_void_double(void* NON_NULL swiftClosureWrapper) noexcept;
330
+ inline Func_void_double_Wrapper wrap_Func_void_double(Func_void_double value) noexcept {
331
+ return Func_void_double_Wrapper(std::move(value));
332
+ }
333
+
334
+ // pragma MARK: std::shared_ptr<Promise<WebViewPackageInfo>>
335
+ /**
336
+ * Specialized version of `std::shared_ptr<Promise<WebViewPackageInfo>>`.
337
+ */
338
+ using std__shared_ptr_Promise_WebViewPackageInfo__ = std::shared_ptr<Promise<WebViewPackageInfo>>;
339
+ inline std::shared_ptr<Promise<WebViewPackageInfo>> create_std__shared_ptr_Promise_WebViewPackageInfo__() noexcept {
340
+ return Promise<WebViewPackageInfo>::create();
341
+ }
342
+ inline PromiseHolder<WebViewPackageInfo> wrap_std__shared_ptr_Promise_WebViewPackageInfo__(std::shared_ptr<Promise<WebViewPackageInfo>> promise) noexcept {
343
+ return PromiseHolder<WebViewPackageInfo>(std::move(promise));
344
+ }
345
+
346
+ // pragma MARK: std::function<void(const WebViewPackageInfo& /* result */)>
347
+ /**
348
+ * Specialized version of `std::function<void(const WebViewPackageInfo&)>`.
349
+ */
350
+ using Func_void_WebViewPackageInfo = std::function<void(const WebViewPackageInfo& /* result */)>;
351
+ /**
352
+ * Wrapper class for a `std::function<void(const WebViewPackageInfo& / * result * /)>`, this can be used from Swift.
353
+ */
354
+ class Func_void_WebViewPackageInfo_Wrapper final {
355
+ public:
356
+ explicit Func_void_WebViewPackageInfo_Wrapper(std::function<void(const WebViewPackageInfo& /* result */)>&& func): _function(std::make_unique<std::function<void(const WebViewPackageInfo& /* result */)>>(std::move(func))) {}
357
+ inline void call(WebViewPackageInfo result) const noexcept {
358
+ _function->operator()(result);
359
+ }
360
+ private:
361
+ std::unique_ptr<std::function<void(const WebViewPackageInfo& /* result */)>> _function;
362
+ } SWIFT_NONCOPYABLE;
363
+ Func_void_WebViewPackageInfo create_Func_void_WebViewPackageInfo(void* NON_NULL swiftClosureWrapper) noexcept;
364
+ inline Func_void_WebViewPackageInfo_Wrapper wrap_Func_void_WebViewPackageInfo(Func_void_WebViewPackageInfo value) noexcept {
365
+ return Func_void_WebViewPackageInfo_Wrapper(std::move(value));
366
+ }
367
+
368
+ // pragma MARK: std::shared_ptr<Promise<GooglePlayServicesStatus>>
369
+ /**
370
+ * Specialized version of `std::shared_ptr<Promise<GooglePlayServicesStatus>>`.
371
+ */
372
+ using std__shared_ptr_Promise_GooglePlayServicesStatus__ = std::shared_ptr<Promise<GooglePlayServicesStatus>>;
373
+ inline std::shared_ptr<Promise<GooglePlayServicesStatus>> create_std__shared_ptr_Promise_GooglePlayServicesStatus__() noexcept {
374
+ return Promise<GooglePlayServicesStatus>::create();
375
+ }
376
+ inline PromiseHolder<GooglePlayServicesStatus> wrap_std__shared_ptr_Promise_GooglePlayServicesStatus__(std::shared_ptr<Promise<GooglePlayServicesStatus>> promise) noexcept {
377
+ return PromiseHolder<GooglePlayServicesStatus>(std::move(promise));
378
+ }
379
+
380
+ // pragma MARK: std::function<void(const GooglePlayServicesStatus& /* result */)>
381
+ /**
382
+ * Specialized version of `std::function<void(const GooglePlayServicesStatus&)>`.
383
+ */
384
+ using Func_void_GooglePlayServicesStatus = std::function<void(const GooglePlayServicesStatus& /* result */)>;
385
+ /**
386
+ * Wrapper class for a `std::function<void(const GooglePlayServicesStatus& / * result * /)>`, this can be used from Swift.
387
+ */
388
+ class Func_void_GooglePlayServicesStatus_Wrapper final {
389
+ public:
390
+ explicit Func_void_GooglePlayServicesStatus_Wrapper(std::function<void(const GooglePlayServicesStatus& /* result */)>&& func): _function(std::make_unique<std::function<void(const GooglePlayServicesStatus& /* result */)>>(std::move(func))) {}
391
+ inline void call(GooglePlayServicesStatus result) const noexcept {
392
+ _function->operator()(result);
393
+ }
394
+ private:
395
+ std::unique_ptr<std::function<void(const GooglePlayServicesStatus& /* result */)>> _function;
396
+ } SWIFT_NONCOPYABLE;
397
+ Func_void_GooglePlayServicesStatus create_Func_void_GooglePlayServicesStatus(void* NON_NULL swiftClosureWrapper) noexcept;
398
+ inline Func_void_GooglePlayServicesStatus_Wrapper wrap_Func_void_GooglePlayServicesStatus(Func_void_GooglePlayServicesStatus value) noexcept {
399
+ return Func_void_GooglePlayServicesStatus_Wrapper(std::move(value));
400
+ }
401
+
160
402
  // pragma MARK: std::shared_ptr<HybridReactNativeDeviceUtilsSpec>
161
403
  /**
162
404
  * Specialized version of `std::shared_ptr<HybridReactNativeDeviceUtilsSpec>`.
@@ -213,5 +455,68 @@ namespace margelo::nitro::reactnativedeviceutils::bridge::swift {
213
455
  inline Result_double_ create_Result_double_(const std::exception_ptr& error) noexcept {
214
456
  return Result<double>::withError(error);
215
457
  }
458
+
459
+ // pragma MARK: Result<std::shared_ptr<Promise<LaunchOptions>>>
460
+ using Result_std__shared_ptr_Promise_LaunchOptions___ = Result<std::shared_ptr<Promise<LaunchOptions>>>;
461
+ inline Result_std__shared_ptr_Promise_LaunchOptions___ create_Result_std__shared_ptr_Promise_LaunchOptions___(const std::shared_ptr<Promise<LaunchOptions>>& value) noexcept {
462
+ return Result<std::shared_ptr<Promise<LaunchOptions>>>::withValue(value);
463
+ }
464
+ inline Result_std__shared_ptr_Promise_LaunchOptions___ create_Result_std__shared_ptr_Promise_LaunchOptions___(const std::exception_ptr& error) noexcept {
465
+ return Result<std::shared_ptr<Promise<LaunchOptions>>>::withError(error);
466
+ }
467
+
468
+ // pragma MARK: Result<std::shared_ptr<Promise<bool>>>
469
+ using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
470
+ inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
471
+ return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
472
+ }
473
+ inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
474
+ return Result<std::shared_ptr<Promise<bool>>>::withError(error);
475
+ }
476
+
477
+ // pragma MARK: Result<std::shared_ptr<Promise<std::string>>>
478
+ using Result_std__shared_ptr_Promise_std__string___ = Result<std::shared_ptr<Promise<std::string>>>;
479
+ 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 {
480
+ return Result<std::shared_ptr<Promise<std::string>>>::withValue(value);
481
+ }
482
+ inline Result_std__shared_ptr_Promise_std__string___ create_Result_std__shared_ptr_Promise_std__string___(const std::exception_ptr& error) noexcept {
483
+ return Result<std::shared_ptr<Promise<std::string>>>::withError(error);
484
+ }
485
+
486
+ // pragma MARK: Result<std::shared_ptr<Promise<void>>>
487
+ using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
488
+ inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
489
+ return Result<std::shared_ptr<Promise<void>>>::withValue(value);
490
+ }
491
+ inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
492
+ return Result<std::shared_ptr<Promise<void>>>::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<WebViewPackageInfo>>>
505
+ using Result_std__shared_ptr_Promise_WebViewPackageInfo___ = Result<std::shared_ptr<Promise<WebViewPackageInfo>>>;
506
+ inline Result_std__shared_ptr_Promise_WebViewPackageInfo___ create_Result_std__shared_ptr_Promise_WebViewPackageInfo___(const std::shared_ptr<Promise<WebViewPackageInfo>>& value) noexcept {
507
+ return Result<std::shared_ptr<Promise<WebViewPackageInfo>>>::withValue(value);
508
+ }
509
+ inline Result_std__shared_ptr_Promise_WebViewPackageInfo___ create_Result_std__shared_ptr_Promise_WebViewPackageInfo___(const std::exception_ptr& error) noexcept {
510
+ return Result<std::shared_ptr<Promise<WebViewPackageInfo>>>::withError(error);
511
+ }
512
+
513
+ // pragma MARK: Result<std::shared_ptr<Promise<GooglePlayServicesStatus>>>
514
+ using Result_std__shared_ptr_Promise_GooglePlayServicesStatus___ = Result<std::shared_ptr<Promise<GooglePlayServicesStatus>>>;
515
+ inline Result_std__shared_ptr_Promise_GooglePlayServicesStatus___ create_Result_std__shared_ptr_Promise_GooglePlayServicesStatus___(const std::shared_ptr<Promise<GooglePlayServicesStatus>>& value) noexcept {
516
+ return Result<std::shared_ptr<Promise<GooglePlayServicesStatus>>>::withValue(value);
517
+ }
518
+ inline Result_std__shared_ptr_Promise_GooglePlayServicesStatus___ create_Result_std__shared_ptr_Promise_GooglePlayServicesStatus___(const std::exception_ptr& error) noexcept {
519
+ return Result<std::shared_ptr<Promise<GooglePlayServicesStatus>>>::withError(error);
520
+ }
216
521
 
217
522
  } // namespace margelo::nitro::reactnativedeviceutils::bridge::swift
@@ -10,20 +10,31 @@
10
10
  // Forward declarations of C++ defined types
11
11
  // Forward declaration of `DualScreenInfoRect` to properly resolve imports.
12
12
  namespace margelo::nitro::reactnativedeviceutils { struct DualScreenInfoRect; }
13
+ // Forward declaration of `GooglePlayServicesStatus` to properly resolve imports.
14
+ namespace margelo::nitro::reactnativedeviceutils { struct GooglePlayServicesStatus; }
13
15
  // Forward declaration of `HybridReactNativeDeviceUtilsSpec` to properly resolve imports.
14
16
  namespace margelo::nitro::reactnativedeviceutils { class HybridReactNativeDeviceUtilsSpec; }
17
+ // Forward declaration of `LaunchOptions` to properly resolve imports.
18
+ namespace margelo::nitro::reactnativedeviceutils { struct LaunchOptions; }
15
19
  // Forward declaration of `UserInterfaceStyle` to properly resolve imports.
16
20
  namespace margelo::nitro::reactnativedeviceutils { enum class UserInterfaceStyle; }
21
+ // Forward declaration of `WebViewPackageInfo` to properly resolve imports.
22
+ namespace margelo::nitro::reactnativedeviceutils { struct WebViewPackageInfo; }
17
23
 
18
24
  // Include C++ defined types
19
25
  #include "DualScreenInfoRect.hpp"
26
+ #include "GooglePlayServicesStatus.hpp"
20
27
  #include "HybridReactNativeDeviceUtilsSpec.hpp"
28
+ #include "LaunchOptions.hpp"
21
29
  #include "UserInterfaceStyle.hpp"
30
+ #include "WebViewPackageInfo.hpp"
22
31
  #include <NitroModules/Promise.hpp>
23
32
  #include <NitroModules/Result.hpp>
24
33
  #include <exception>
25
34
  #include <functional>
26
35
  #include <memory>
36
+ #include <optional>
37
+ #include <string>
27
38
  #include <vector>
28
39
 
29
40
  // C++ helpers for Swift
@@ -16,12 +16,23 @@ namespace ReactNativeDeviceUtils { class HybridReactNativeDeviceUtilsSpec_cxx; }
16
16
  namespace margelo::nitro::reactnativedeviceutils { struct DualScreenInfoRect; }
17
17
  // Forward declaration of `UserInterfaceStyle` to properly resolve imports.
18
18
  namespace margelo::nitro::reactnativedeviceutils { enum class UserInterfaceStyle; }
19
+ // Forward declaration of `LaunchOptions` to properly resolve imports.
20
+ namespace margelo::nitro::reactnativedeviceutils { struct LaunchOptions; }
21
+ // Forward declaration of `WebViewPackageInfo` to properly resolve imports.
22
+ namespace margelo::nitro::reactnativedeviceutils { struct WebViewPackageInfo; }
23
+ // Forward declaration of `GooglePlayServicesStatus` to properly resolve imports.
24
+ namespace margelo::nitro::reactnativedeviceutils { struct GooglePlayServicesStatus; }
19
25
 
20
26
  #include "DualScreenInfoRect.hpp"
21
27
  #include <vector>
22
28
  #include <NitroModules/Promise.hpp>
23
29
  #include <functional>
24
30
  #include "UserInterfaceStyle.hpp"
31
+ #include "LaunchOptions.hpp"
32
+ #include <string>
33
+ #include <optional>
34
+ #include "WebViewPackageInfo.hpp"
35
+ #include "GooglePlayServicesStatus.hpp"
25
36
 
26
37
  #include "ReactNativeDeviceUtils-Swift-Cxx-Umbrella.hpp"
27
38
 
@@ -131,6 +142,76 @@ namespace margelo::nitro::reactnativedeviceutils {
131
142
  std::rethrow_exception(__result.error());
132
143
  }
133
144
  }
145
+ inline std::shared_ptr<Promise<LaunchOptions>> getLaunchOptions() override {
146
+ auto __result = _swiftPart.getLaunchOptions();
147
+ if (__result.hasError()) [[unlikely]] {
148
+ std::rethrow_exception(__result.error());
149
+ }
150
+ auto __value = std::move(__result.value());
151
+ return __value;
152
+ }
153
+ inline std::shared_ptr<Promise<bool>> clearLaunchOptions() override {
154
+ auto __result = _swiftPart.clearLaunchOptions();
155
+ if (__result.hasError()) [[unlikely]] {
156
+ std::rethrow_exception(__result.error());
157
+ }
158
+ auto __value = std::move(__result.value());
159
+ return __value;
160
+ }
161
+ inline std::shared_ptr<Promise<std::string>> getDeviceToken() override {
162
+ auto __result = _swiftPart.getDeviceToken();
163
+ if (__result.hasError()) [[unlikely]] {
164
+ std::rethrow_exception(__result.error());
165
+ }
166
+ auto __value = std::move(__result.value());
167
+ return __value;
168
+ }
169
+ inline std::shared_ptr<Promise<void>> saveDeviceToken(const std::string& token) override {
170
+ auto __result = _swiftPart.saveDeviceToken(token);
171
+ if (__result.hasError()) [[unlikely]] {
172
+ std::rethrow_exception(__result.error());
173
+ }
174
+ auto __value = std::move(__result.value());
175
+ return __value;
176
+ }
177
+ inline std::shared_ptr<Promise<bool>> registerDeviceToken() override {
178
+ auto __result = _swiftPart.registerDeviceToken();
179
+ if (__result.hasError()) [[unlikely]] {
180
+ std::rethrow_exception(__result.error());
181
+ }
182
+ auto __value = std::move(__result.value());
183
+ return __value;
184
+ }
185
+ inline std::shared_ptr<Promise<double>> getStartupTime() override {
186
+ auto __result = _swiftPart.getStartupTime();
187
+ if (__result.hasError()) [[unlikely]] {
188
+ std::rethrow_exception(__result.error());
189
+ }
190
+ auto __value = std::move(__result.value());
191
+ return __value;
192
+ }
193
+ inline void exitApp() override {
194
+ auto __result = _swiftPart.exitApp();
195
+ if (__result.hasError()) [[unlikely]] {
196
+ std::rethrow_exception(__result.error());
197
+ }
198
+ }
199
+ inline std::shared_ptr<Promise<WebViewPackageInfo>> getCurrentWebViewPackageInfo() override {
200
+ auto __result = _swiftPart.getCurrentWebViewPackageInfo();
201
+ if (__result.hasError()) [[unlikely]] {
202
+ std::rethrow_exception(__result.error());
203
+ }
204
+ auto __value = std::move(__result.value());
205
+ return __value;
206
+ }
207
+ inline std::shared_ptr<Promise<GooglePlayServicesStatus>> isGooglePlayServicesAvailable() override {
208
+ auto __result = _swiftPart.isGooglePlayServicesAvailable();
209
+ if (__result.hasError()) [[unlikely]] {
210
+ std::rethrow_exception(__result.error());
211
+ }
212
+ auto __value = std::move(__result.value());
213
+ return __value;
214
+ }
134
215
 
135
216
  private:
136
217
  ReactNativeDeviceUtils::HybridReactNativeDeviceUtilsSpec_cxx _swiftPart;
@@ -0,0 +1,47 @@
1
+ ///
2
+ /// Func_void.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
+ import Foundation
9
+ import NitroModules
10
+
11
+ /**
12
+ * Wraps a Swift `() -> 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 {
16
+ public typealias bridge = margelo.nitro.reactnativedeviceutils.bridge.swift
17
+
18
+ private let closure: () -> Void
19
+
20
+ public init(_ closure: @escaping () -> Void) {
21
+ self.closure = closure
22
+ }
23
+
24
+ @inline(__always)
25
+ public func call() -> Void {
26
+ self.closure()
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`.
40
+ * The pointer has to be a retained opaque `Unmanaged<Func_void>`.
41
+ * This removes one strong reference from the object!
42
+ */
43
+ @inline(__always)
44
+ public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void {
45
+ return Unmanaged<Func_void>.fromOpaque(pointer).takeRetainedValue()
46
+ }
47
+ }
@@ -0,0 +1,47 @@
1
+ ///
2
+ /// Func_void_GooglePlayServicesStatus.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
+ import Foundation
9
+ import NitroModules
10
+
11
+ /**
12
+ * Wraps a Swift `(_ value: GooglePlayServicesStatus) -> 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_GooglePlayServicesStatus {
16
+ public typealias bridge = margelo.nitro.reactnativedeviceutils.bridge.swift
17
+
18
+ private let closure: (_ value: GooglePlayServicesStatus) -> Void
19
+
20
+ public init(_ closure: @escaping (_ value: GooglePlayServicesStatus) -> Void) {
21
+ self.closure = closure
22
+ }
23
+
24
+ @inline(__always)
25
+ public func call(value: GooglePlayServicesStatus) -> 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_GooglePlayServicesStatus`.
40
+ * The pointer has to be a retained opaque `Unmanaged<Func_void_GooglePlayServicesStatus>`.
41
+ * This removes one strong reference from the object!
42
+ */
43
+ @inline(__always)
44
+ public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_GooglePlayServicesStatus {
45
+ return Unmanaged<Func_void_GooglePlayServicesStatus>.fromOpaque(pointer).takeRetainedValue()
46
+ }
47
+ }
@@ -0,0 +1,47 @@
1
+ ///
2
+ /// Func_void_LaunchOptions.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
+ import Foundation
9
+ import NitroModules
10
+
11
+ /**
12
+ * Wraps a Swift `(_ value: LaunchOptions) -> 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_LaunchOptions {
16
+ public typealias bridge = margelo.nitro.reactnativedeviceutils.bridge.swift
17
+
18
+ private let closure: (_ value: LaunchOptions) -> Void
19
+
20
+ public init(_ closure: @escaping (_ value: LaunchOptions) -> Void) {
21
+ self.closure = closure
22
+ }
23
+
24
+ @inline(__always)
25
+ public func call(value: LaunchOptions) -> 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_LaunchOptions`.
40
+ * The pointer has to be a retained opaque `Unmanaged<Func_void_LaunchOptions>`.
41
+ * This removes one strong reference from the object!
42
+ */
43
+ @inline(__always)
44
+ public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_LaunchOptions {
45
+ return Unmanaged<Func_void_LaunchOptions>.fromOpaque(pointer).takeRetainedValue()
46
+ }
47
+ }
@@ -0,0 +1,47 @@
1
+ ///
2
+ /// Func_void_WebViewPackageInfo.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
+ import Foundation
9
+ import NitroModules
10
+
11
+ /**
12
+ * Wraps a Swift `(_ value: WebViewPackageInfo) -> 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_WebViewPackageInfo {
16
+ public typealias bridge = margelo.nitro.reactnativedeviceutils.bridge.swift
17
+
18
+ private let closure: (_ value: WebViewPackageInfo) -> Void
19
+
20
+ public init(_ closure: @escaping (_ value: WebViewPackageInfo) -> Void) {
21
+ self.closure = closure
22
+ }
23
+
24
+ @inline(__always)
25
+ public func call(value: WebViewPackageInfo) -> 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_WebViewPackageInfo`.
40
+ * The pointer has to be a retained opaque `Unmanaged<Func_void_WebViewPackageInfo>`.
41
+ * This removes one strong reference from the object!
42
+ */
43
+ @inline(__always)
44
+ public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_WebViewPackageInfo {
45
+ return Unmanaged<Func_void_WebViewPackageInfo>.fromOpaque(pointer).takeRetainedValue()
46
+ }
47
+ }