diff --git a/CHANGELOG.md b/CHANGELOG.md
index 79dc3d70..5e23af13 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,28 @@
All notable changes to this project will be documented in this file.
+## [1.1.38] - 2026-03-14
+
+### Features
+- **scroll-guard**: Add new `@onekeyfe/react-native-scroll-guard` native view module that prevents parent scrollable containers (PagerView/ViewPager2) from intercepting child scroll gestures
+- **scroll-guard**: Support `direction` prop with horizontal, vertical, and both modes
+
+### Bug Fixes
+- **scroll-guard (Android)**: Use `ViewGroupManager` instead of nitrogen-generated `SimpleViewManager` to properly support child views (fixes `IViewGroupManager` ClassCastException)
+- **scroll-guard (iOS)**: Improve gesture blocking reliability
+
+### Chores
+- Add `nitrogen/` to `.gitignore` and remove tracked nitrogen files
+- Bump all native modules and views to 1.1.38
+
+## [1.1.37] - 2026-03-12
+
+### Features
+- **bundle-update**: Add `resetToBuiltInBundle()` API to clear the current bundle version preference, reverting to built-in JS bundle on next restart
+
+### Chores
+- Bump all native modules and views to 1.1.37
+
## [1.1.36] - 2026-03-10
### Features
diff --git a/example/react-native/ios/Podfile.lock b/example/react-native/ios/Podfile.lock
index 14460e95..095c22cb 100644
--- a/example/react-native/ios/Podfile.lock
+++ b/example/react-native/ios/Podfile.lock
@@ -1,5 +1,5 @@
PODS:
- - AutoSizeInput (1.1.35):
+ - AutoSizeInput (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -29,7 +29,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- - BackgroundThread (1.1.35):
+ - BackgroundThread (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -59,7 +59,7 @@ PODS:
- SocketRocket
- Yoga
- boost (1.84.0)
- - CloudKitModule (1.1.35):
+ - CloudKitModule (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -101,7 +101,7 @@ PODS:
- hermes-engine (0.14.0):
- hermes-engine/Pre-built (= 0.14.0)
- hermes-engine/Pre-built (0.14.0)
- - KeychainModule (1.1.35):
+ - KeychainModule (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -2079,7 +2079,7 @@ PODS:
- React-RCTFBReactNativeSpec
- ReactCommon/turbomodule/core
- SocketRocket
- - react-native-pager-view (1.1.35):
+ - react-native-pager-view (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -2194,7 +2194,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- - react-native-tab-view (1.1.35):
+ - react-native-tab-view (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -2212,7 +2212,7 @@ PODS:
- React-graphics
- React-ImageManager
- React-jsi
- - react-native-tab-view/common (= 1.1.35)
+ - react-native-tab-view/common (= 1.1.37)
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
@@ -2223,7 +2223,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- - react-native-tab-view/common (1.1.35):
+ - react-native-tab-view/common (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -2808,7 +2808,7 @@ PODS:
- React-perflogger (= 0.83.0)
- React-utils (= 0.83.0)
- SocketRocket
- - ReactNativeAppUpdate (1.1.35):
+ - ReactNativeAppUpdate (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -2839,7 +2839,7 @@ PODS:
- ReactNativeNativeLogger
- SocketRocket
- Yoga
- - ReactNativeBundleUpdate (1.1.35):
+ - ReactNativeBundleUpdate (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -2872,7 +2872,7 @@ PODS:
- SocketRocket
- SSZipArchive (~> 2.4)
- Yoga
- - ReactNativeCheckBiometricAuthChanged (1.1.35):
+ - ReactNativeCheckBiometricAuthChanged (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -2903,7 +2903,7 @@ PODS:
- ReactNativeNativeLogger
- SocketRocket
- Yoga
- - ReactNativeDeviceUtils (1.1.35):
+ - ReactNativeDeviceUtils (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -2934,7 +2934,7 @@ PODS:
- ReactNativeNativeLogger
- SocketRocket
- Yoga
- - ReactNativeGetRandomValues (1.1.35):
+ - ReactNativeGetRandomValues (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -2965,7 +2965,7 @@ PODS:
- ReactNativeNativeLogger
- SocketRocket
- Yoga
- - ReactNativeLiteCard (1.1.35):
+ - ReactNativeLiteCard (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -2994,7 +2994,7 @@ PODS:
- ReactNativeNativeLogger
- SocketRocket
- Yoga
- - ReactNativeNativeLogger (1.1.35):
+ - ReactNativeNativeLogger (1.1.37):
- boost
- CocoaLumberjack/Swift (~> 3.8)
- DoubleConversion
@@ -3025,7 +3025,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- - ReactNativePerfMemory (1.1.35):
+ - ReactNativePerfMemory (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -3056,7 +3056,7 @@ PODS:
- ReactNativeNativeLogger
- SocketRocket
- Yoga
- - ReactNativeSplashScreen (1.1.35):
+ - ReactNativeSplashScreen (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -3146,7 +3146,37 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- - Skeleton (1.1.35):
+ - ScrollGuard (0.1.0):
+ - boost
+ - DoubleConversion
+ - fast_float
+ - fmt
+ - glog
+ - hermes-engine
+ - NitroModules
+ - RCT-Folly
+ - RCT-Folly/Fabric
+ - RCTRequired
+ - RCTTypeSafety
+ - React-callinvoker
+ - React-Core
+ - React-debug
+ - React-Fabric
+ - React-featureflags
+ - React-graphics
+ - React-ImageManager
+ - React-jsi
+ - React-NativeModulesApple
+ - React-RCTFabric
+ - React-renderercss
+ - React-rendererdebug
+ - React-utils
+ - ReactCodegen
+ - ReactCommon/turbomodule/bridging
+ - ReactCommon/turbomodule/core
+ - SocketRocket
+ - Yoga
+ - Skeleton (1.1.37):
- boost
- DoubleConversion
- fast_float
@@ -3277,6 +3307,7 @@ DEPENDENCIES:
- "ReactNativePerfMemory (from `../../../node_modules/@onekeyfe/react-native-perf-memory`)"
- "ReactNativeSplashScreen (from `../../../node_modules/@onekeyfe/react-native-splash-screen`)"
- RNScreens (from `../../../node_modules/react-native-screens`)
+ - "ScrollGuard (from `../../../node_modules/@onekeyfe/react-native-scroll-guard`)"
- "Skeleton (from `../../../node_modules/@onekeyfe/react-native-skeleton`)"
- SocketRocket (~> 0.7.1)
- Yoga (from `../../../node_modules/react-native/ReactCommon/yoga`)
@@ -3481,16 +3512,18 @@ EXTERNAL SOURCES:
:path: "../../../node_modules/@onekeyfe/react-native-splash-screen"
RNScreens:
:path: "../../../node_modules/react-native-screens"
+ ScrollGuard:
+ :path: "../../../node_modules/@onekeyfe/react-native-scroll-guard"
Skeleton:
:path: "../../../node_modules/@onekeyfe/react-native-skeleton"
Yoga:
:path: "../../../node_modules/react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
- AutoSizeInput: aec6059c3f30b1ff144d9e4ce57e5de35bb20ade
- BackgroundThread: 2b24f19a73ead04ee942dbdab768469a30efb3a7
+ AutoSizeInput: e9c8048921c7650c5ba8de7df1e3b8483816bbcd
+ BackgroundThread: decbbbae37a9753bc11b4d212b803b6f816c01d8
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
- CloudKitModule: 3cc682bc9ec6d744baf6d19bd8a4fea50413dddc
+ CloudKitModule: e3e86a266b3eba5da57a0c544a78662736c6d98c
CocoaLumberjack: 5644158777912b7de7469fa881f8a3f259c2512a
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
fast_float: b32c788ed9c6a8c584d114d0047beda9664e7cc6
@@ -3498,7 +3531,7 @@ SPEC CHECKSUMS:
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
hermes-engine: 70fdc9d0bb0d8532e0411dcb21e53ce5a160960a
- KeychainModule: 9d66c18c962aa0dded8381837ac14301802df4a8
+ KeychainModule: 0632fd39966443f95723c147dc09260738304a8b
MMKV: 1a8e7dbce7f9cad02c52e1b1091d07bd843aefaf
MMKVCore: f2dd4c9befea04277a55e84e7812f930537993df
NitroMmkv: 0be91455465952f2b943f753b9ee7df028d89e5c
@@ -3539,9 +3572,9 @@ SPEC CHECKSUMS:
React-logger: 9e597cbeda7b8cc8aa8fb93860dade97190f69cc
React-Mapbuffer: 20046c0447efaa7aace0b76085aa9bb35b0e8105
React-microtasksnativemodule: 0e837de56519c92d8a2e3097717df9497feb33cb
- react-native-pager-view: 7f72086be2ac2f86585eb4a926b8f2dec004f5a4
+ react-native-pager-view: 974f0f019398f2ecb290813f516f4aff4323bcfa
react-native-safe-area-context: c00143b4823773bba23f2f19f85663ae89ceb460
- react-native-tab-view: 0776740aa714950db8081b7dad5e2ead72dd2c9e
+ react-native-tab-view: 086ceab177015b7e9a3f3311ec68ce5266b0d05f
React-NativeModulesApple: 1a378198515f8e825c5931a7613e98da69320cee
React-networking: bfd1695ada5a57023006ce05823ac5391c3ce072
React-oscompat: aedc0afbded67280de6bb6bfac8cfde0389e2b33
@@ -3575,17 +3608,18 @@ SPEC CHECKSUMS:
ReactAppDependencyProvider: ebcf3a78dc1bcdf054c9e8d309244bade6b31568
ReactCodegen: 554b421c45b7df35ac791da1b734335470b55fcc
ReactCommon: 424cc34cf5055d69a3dcf02f3436481afb8b0f6f
- ReactNativeAppUpdate: 3be2a7a25c7fcad44ea97ae8f1f32f1826ed5734
- ReactNativeBundleUpdate: b66bc7d310cdf9b4c668b85e4de765e955407069
- ReactNativeCheckBiometricAuthChanged: 3e5d63c1d83e88d6d0d7ddc924158c86a11aea1c
- ReactNativeDeviceUtils: 57d10630250a0924105a81825a4fca4fbfe7bfee
- ReactNativeGetRandomValues: 31634da5685e2cd35b795c40b5565cc894b08b42
- ReactNativeLiteCard: 5925c04a3444c3284a47721b4a1e7737ed2ad63a
- ReactNativeNativeLogger: e4cba8af0154ae7f253056a7190fe17cbb8b98e9
- ReactNativePerfMemory: 84882dc009f62092e2e825d06afefc4c93ce6611
- ReactNativeSplashScreen: 71c5816681045f705705859336702431bce526f5
+ ReactNativeAppUpdate: 842a850b1401010494878864d0478b57c5dfc5bd
+ ReactNativeBundleUpdate: 8659a3a64d662cfe651d4528028b8079a3e6a0c1
+ ReactNativeCheckBiometricAuthChanged: c9c55befec4bf21c294479e19db63a1e3f1b7bea
+ ReactNativeDeviceUtils: de3ff506c33c4bc775e785e1e58afd80020a538c
+ ReactNativeGetRandomValues: 55821009e6d90903e3823d28acbc047ae01d9455
+ ReactNativeLiteCard: 94a953c1c216614793f0501f17b96a002cddf76f
+ ReactNativeNativeLogger: 5b058630963f29d67580f4f18873e0ed6de77f78
+ ReactNativePerfMemory: 37600dfacbddd821eddae626657a1e964a983083
+ ReactNativeSplashScreen: 755662bfc17f362fc9456ce2ac8056903e132903
RNScreens: 7f643ee0fd1407dc5085c7795460bd93da113b8f
- Skeleton: 35cf368c86a53a63016a7100bbfe46ec964e3b84
+ ScrollGuard: 98ea193d9702aa6cbf8bbf67ff06bb17f3995f9b
+ Skeleton: 8e9eaadf000433e82dd908b1f0efdde149aaf144
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
Yoga: 6ca93c8c13f56baeec55eb608577619b17a4d64e
diff --git a/example/react-native/package.json b/example/react-native/package.json
index 54ce2412..ef60ee5a 100644
--- a/example/react-native/package.json
+++ b/example/react-native/package.json
@@ -24,6 +24,7 @@
"@onekeyfe/react-native-native-logger": "workspace:*",
"@onekeyfe/react-native-pager-view": "workspace:*",
"@onekeyfe/react-native-perf-memory": "workspace:*",
+ "@onekeyfe/react-native-scroll-guard": "workspace:*",
"@onekeyfe/react-native-skeleton": "workspace:*",
"@onekeyfe/react-native-splash-screen": "workspace:*",
"@onekeyfe/react-native-tab-view": "workspace:*",
diff --git a/example/react-native/pages/ScrollGuardTestPage.tsx b/example/react-native/pages/ScrollGuardTestPage.tsx
new file mode 100644
index 00000000..8062d3c0
--- /dev/null
+++ b/example/react-native/pages/ScrollGuardTestPage.tsx
@@ -0,0 +1,243 @@
+import React, { useState } from 'react';
+import { ScrollView, StyleSheet, Text, View } from 'react-native';
+import PagerView, { type PagerViewOnPageSelectedEvent } from '@onekeyfe/react-native-pager-view';
+import { ScrollGuardView } from '@onekeyfe/react-native-scroll-guard';
+import { TestButton, TestPageBase } from './TestPageBase';
+
+const PAGER_PAGES = [
+ { key: 'market', title: 'Market', color: '#E8F1FF' },
+ { key: 'earn', title: 'Earn', color: '#EAF9F1' },
+ { key: 'browser', title: 'Browser', color: '#FFF6E5' },
+] as const;
+
+const BANNER_ITEMS = Array.from({ length: 8 }, (_, i) => ({
+ key: `banner-${i}`,
+ title: `Category ${i + 1}`,
+ value: `+${(Math.random() * 10).toFixed(2)}%`,
+ color: `hsl(${i * 45}, 60%, 92%)`,
+}));
+
+function BannerCard({ title, value, color }: { title: string; value: string; color: string }) {
+ return (
+
+ {title}
+ {value}
+
+ );
+}
+
+function HorizontalBanner({ guarded }: { guarded: boolean }) {
+ const content = (
+
+ {BANNER_ITEMS.map((item) => (
+
+ ))}
+
+ );
+
+ if (guarded) {
+ return (
+
+ {content}
+
+ );
+ }
+
+ return content;
+}
+
+export function ScrollGuardTestPage() {
+ const [currentPage, setCurrentPage] = useState(0);
+ const [guardEnabled, setGuardEnabled] = useState(true);
+
+ const handlePageSelected = (event: PagerViewOnPageSelectedEvent) => {
+ setCurrentPage(event.nativeEvent.position);
+ };
+
+ return (
+
+
+ Horizontal ScrollView inside PagerView
+
+ The banner area contains a horizontal ScrollView. Without ScrollGuard,
+ scrolling to the edge of the banner triggers the outer PagerView to swipe.
+
+
+
+
+
+ Current Page
+ {PAGER_PAGES[currentPage]?.title}
+
+
+ ScrollGuard
+
+ {guardEnabled ? 'ON' : 'OFF'}
+
+
+
+
+ setGuardEnabled((prev) => !prev)}
+ />
+
+
+ {PAGER_PAGES.map((page) => (
+
+ {page.title}
+
+
+
+ {guardEnabled ? 'Guarded Banner (scroll freely)' : 'Unguarded Banner (triggers pager at edge)'}
+
+
+
+
+
+ Scroll the banner to the edge, then keep swiping.{'\n'}
+ {guardEnabled
+ ? 'With ScrollGuard: pager stays on this page.'
+ : 'Without ScrollGuard: pager swipes to next page.'}
+
+
+ ))}
+
+
+
+ How to test
+
+ 1. Scroll the banner cards horizontally to the right edge{'\n'}
+ 2. Keep swiping left — observe if the outer pager switches{'\n'}
+ 3. Toggle ScrollGuard OFF and repeat to see the difference{'\n'}
+ 4. Verify vertical scrolling still works (scroll this page)
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ headerCard: {
+ backgroundColor: '#FFFFFF',
+ borderRadius: 12,
+ padding: 16,
+ gap: 8,
+ },
+ headerTitle: {
+ fontSize: 16,
+ fontWeight: '700',
+ color: '#111111',
+ },
+ headerSubtitle: {
+ fontSize: 13,
+ color: '#666666',
+ lineHeight: 18,
+ },
+ statusRow: {
+ flexDirection: 'row',
+ gap: 12,
+ },
+ statusItem: {
+ flex: 1,
+ backgroundColor: '#FFFFFF',
+ borderRadius: 12,
+ padding: 16,
+ alignItems: 'center',
+ gap: 4,
+ },
+ statusLabel: {
+ fontSize: 12,
+ color: '#8E8E93',
+ fontWeight: '500',
+ },
+ statusValue: {
+ fontSize: 18,
+ fontWeight: '700',
+ color: '#111111',
+ },
+ pagerView: {
+ height: 360,
+ borderRadius: 12,
+ overflow: 'hidden',
+ },
+ page: {
+ flex: 1,
+ paddingHorizontal: 16,
+ paddingVertical: 20,
+ gap: 12,
+ },
+ pageTitle: {
+ fontSize: 22,
+ fontWeight: '700',
+ color: '#111111',
+ textAlign: 'center',
+ },
+ bannerSection: {
+ gap: 8,
+ },
+ sectionLabel: {
+ fontSize: 13,
+ fontWeight: '600',
+ color: '#555555',
+ },
+ guardWrapper: {
+ // ScrollGuardView needs no special styling — it's a transparent wrapper
+ },
+ bannerContainer: {
+ paddingVertical: 8,
+ paddingHorizontal: 4,
+ gap: 10,
+ },
+ bannerCard: {
+ width: 120,
+ height: 80,
+ borderRadius: 12,
+ padding: 12,
+ justifyContent: 'space-between',
+ },
+ bannerTitle: {
+ fontSize: 14,
+ fontWeight: '600',
+ color: '#333333',
+ },
+ bannerValue: {
+ fontSize: 16,
+ fontWeight: '700',
+ color: '#34C759',
+ },
+ pageHint: {
+ fontSize: 12,
+ color: '#444444',
+ textAlign: 'center',
+ lineHeight: 18,
+ marginTop: 4,
+ },
+ instructionCard: {
+ backgroundColor: '#FFFFFF',
+ borderRadius: 12,
+ padding: 16,
+ gap: 8,
+ },
+ instructionTitle: {
+ fontSize: 15,
+ fontWeight: '700',
+ color: '#111111',
+ },
+ instructionText: {
+ fontSize: 13,
+ color: '#555555',
+ lineHeight: 20,
+ },
+});
diff --git a/example/react-native/route.tsx b/example/react-native/route.tsx
index 791fd977..524284e5 100644
--- a/example/react-native/route.tsx
+++ b/example/react-native/route.tsx
@@ -14,6 +14,7 @@ import { DeviceUtilsTestPage } from './pages/DeviceUtilsTestPage';
import { SkeletonTestPage } from './pages/SkeletonTestPage';
import { NativeLoggerTestPage } from './pages/NativeLoggerTestPage';
import { PagerViewTestPage } from './pages/PagerViewTestPage';
+import { ScrollGuardTestPage } from './pages/ScrollGuardTestPage';
import { PerfMemoryTestPage } from './pages/PerfMemoryTestPage';
import { BundleUpdateTestPage } from './pages/BundleUpdateTestPage';
import { AppUpdateTestPage } from './pages/AppUpdateTestPage';
@@ -45,6 +46,7 @@ export type RootStackParamList = {
NativeLogger: undefined;
PagerView: undefined;
PerfMemory: undefined;
+ ScrollGuard: undefined;
Skeleton: undefined;
SplashScreen: undefined;
TabView: undefined;
@@ -134,6 +136,12 @@ const modules: { screen: keyof RootStackParamList; name: string; description: st
description: 'Read process memory usage (RSS) for performance monitoring',
icon: '📊',
},
+ {
+ screen: 'ScrollGuard',
+ name: 'Scroll Guard',
+ description: 'Prevent parent PagerView from intercepting child ScrollView gestures',
+ icon: '🛡️',
+ },
{
screen: 'Skeleton',
name: 'Skeleton View',
@@ -340,6 +348,7 @@ export function AppNavigator() {
+
diff --git a/native-modules/native-logger/nitrogen/generated/.gitattributes b/native-modules/native-logger/nitrogen/generated/.gitattributes
deleted file mode 100644
index fb7a0d5a..00000000
--- a/native-modules/native-logger/nitrogen/generated/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-** linguist-generated=true
diff --git a/native-modules/native-logger/nitrogen/generated/android/c++/JHybridNativeLoggerSpec.cpp b/native-modules/native-logger/nitrogen/generated/android/c++/JHybridNativeLoggerSpec.cpp
deleted file mode 100644
index 7298c4dc..00000000
--- a/native-modules/native-logger/nitrogen/generated/android/c++/JHybridNativeLoggerSpec.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-///
-/// JHybridNativeLoggerSpec.cpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#include "JHybridNativeLoggerSpec.hpp"
-
-
-
-#include
-#include
-#include
-#include
-
-namespace margelo::nitro::nativelogger {
-
- jni::local_ref JHybridNativeLoggerSpec::initHybrid(jni::alias_ref jThis) {
- return makeCxxInstance(jThis);
- }
-
- void JHybridNativeLoggerSpec::registerNatives() {
- registerHybrid({
- makeNativeMethod("initHybrid", JHybridNativeLoggerSpec::initHybrid),
- });
- }
-
- size_t JHybridNativeLoggerSpec::getExternalMemorySize() noexcept {
- static const auto method = javaClassStatic()->getMethod("getMemorySize");
- return method(_javaPart);
- }
-
- void JHybridNativeLoggerSpec::dispose() noexcept {
- static const auto method = javaClassStatic()->getMethod("dispose");
- method(_javaPart);
- }
-
- std::string JHybridNativeLoggerSpec::toString() {
- static const auto method = javaClassStatic()->getMethod("toString");
- auto javaString = method(_javaPart);
- return javaString->toStdString();
- }
-
- // Properties
-
-
- // Methods
- void JHybridNativeLoggerSpec::write(double level, const std::string& msg) {
- static const auto method = javaClassStatic()->getMethod /* msg */)>("write");
- method(_javaPart, level, jni::make_jstring(msg));
- }
- std::string JHybridNativeLoggerSpec::getLogDirectory() {
- static const auto method = javaClassStatic()->getMethod()>("getLogDirectory");
- auto __result = method(_javaPart);
- return __result->toStdString();
- }
- std::shared_ptr>> JHybridNativeLoggerSpec::getLogFilePaths() {
- static const auto method = javaClassStatic()->getMethod()>("getLogFilePaths");
- auto __result = method(_javaPart);
- return [&]() {
- auto __promise = Promise>::create();
- __result->cthis()->addOnResolvedListener([=](const jni::alias_ref& __boxedResult) {
- auto __result = jni::static_ref_cast>(__boxedResult);
- __promise->resolve([&]() {
- size_t __size = __result->size();
- std::vector __vector;
- __vector.reserve(__size);
- for (size_t __i = 0; __i < __size; __i++) {
- auto __element = __result->getElement(__i);
- __vector.push_back(__element->toStdString());
- }
- return __vector;
- }());
- });
- __result->cthis()->addOnRejectedListener([=](const jni::alias_ref& __throwable) {
- jni::JniException __jniError(__throwable);
- __promise->reject(std::make_exception_ptr(__jniError));
- });
- return __promise;
- }();
- }
- std::shared_ptr> JHybridNativeLoggerSpec::deleteLogFiles() {
- static const auto method = javaClassStatic()->getMethod()>("deleteLogFiles");
- auto __result = method(_javaPart);
- return [&]() {
- auto __promise = Promise::create();
- __result->cthis()->addOnResolvedListener([=](const jni::alias_ref& /* unit */) {
- __promise->resolve();
- });
- __result->cthis()->addOnRejectedListener([=](const jni::alias_ref& __throwable) {
- jni::JniException __jniError(__throwable);
- __promise->reject(std::make_exception_ptr(__jniError));
- });
- return __promise;
- }();
- }
-
-} // namespace margelo::nitro::nativelogger
diff --git a/native-modules/native-logger/nitrogen/generated/android/c++/JHybridNativeLoggerSpec.hpp b/native-modules/native-logger/nitrogen/generated/android/c++/JHybridNativeLoggerSpec.hpp
deleted file mode 100644
index ba513c6b..00000000
--- a/native-modules/native-logger/nitrogen/generated/android/c++/JHybridNativeLoggerSpec.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-///
-/// HybridNativeLoggerSpec.hpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#pragma once
-
-#include
-#include
-#include "HybridNativeLoggerSpec.hpp"
-
-
-
-
-namespace margelo::nitro::nativelogger {
-
- using namespace facebook;
-
- class JHybridNativeLoggerSpec: public jni::HybridClass,
- public virtual HybridNativeLoggerSpec {
- public:
- static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nativelogger/HybridNativeLoggerSpec;";
- static jni::local_ref initHybrid(jni::alias_ref jThis);
- static void registerNatives();
-
- protected:
- // C++ constructor (called from Java via `initHybrid()`)
- explicit JHybridNativeLoggerSpec(jni::alias_ref jThis) :
- HybridObject(HybridNativeLoggerSpec::TAG),
- HybridBase(jThis),
- _javaPart(jni::make_global(jThis)) {}
-
- public:
- ~JHybridNativeLoggerSpec() override {
- // Hermes GC can destroy JS objects on a non-JNI Thread.
- jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
- }
-
- public:
- size_t getExternalMemorySize() noexcept override;
- void dispose() noexcept override;
- std::string toString() override;
-
- public:
- inline const jni::global_ref& getJavaPart() const noexcept {
- return _javaPart;
- }
-
- public:
- // Properties
-
-
- public:
- // Methods
- void write(double level, const std::string& msg) override;
- std::string getLogDirectory() override;
- std::shared_ptr>> getLogFilePaths() override;
- std::shared_ptr> deleteLogFiles() override;
-
- private:
- friend HybridBase;
- using HybridBase::HybridBase;
- jni::global_ref _javaPart;
- };
-
-} // namespace margelo::nitro::nativelogger
diff --git a/native-modules/native-logger/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelogger/HybridNativeLoggerSpec.kt b/native-modules/native-logger/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelogger/HybridNativeLoggerSpec.kt
deleted file mode 100644
index 757d74e6..00000000
--- a/native-modules/native-logger/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelogger/HybridNativeLoggerSpec.kt
+++ /dev/null
@@ -1,70 +0,0 @@
-///
-/// HybridNativeLoggerSpec.kt
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-package com.margelo.nitro.nativelogger
-
-import androidx.annotation.Keep
-import com.facebook.jni.HybridData
-import com.facebook.proguard.annotations.DoNotStrip
-import com.margelo.nitro.core.Promise
-import com.margelo.nitro.core.HybridObject
-
-/**
- * A Kotlin class representing the NativeLogger HybridObject.
- * Implement this abstract class to create Kotlin-based instances of NativeLogger.
- */
-@DoNotStrip
-@Keep
-@Suppress(
- "KotlinJniMissingFunction", "unused",
- "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
- "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
-)
-abstract class HybridNativeLoggerSpec: HybridObject() {
- @DoNotStrip
- private var mHybridData: HybridData = initHybrid()
-
- init {
- super.updateNative(mHybridData)
- }
-
- override fun updateNative(hybridData: HybridData) {
- mHybridData = hybridData
- super.updateNative(hybridData)
- }
-
- // Default implementation of `HybridObject.toString()`
- override fun toString(): String {
- return "[HybridObject NativeLogger]"
- }
-
- // Properties
-
-
- // Methods
- @DoNotStrip
- @Keep
- abstract fun write(level: Double, msg: String): Unit
-
- @DoNotStrip
- @Keep
- abstract fun getLogDirectory(): String
-
- @DoNotStrip
- @Keep
- abstract fun getLogFilePaths(): Promise>
-
- @DoNotStrip
- @Keep
- abstract fun deleteLogFiles(): Promise
-
- private external fun initHybrid(): HybridData
-
- companion object {
- protected const val TAG = "HybridNativeLoggerSpec"
- }
-}
diff --git a/native-modules/native-logger/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelogger/nativeloggerOnLoad.kt b/native-modules/native-logger/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelogger/nativeloggerOnLoad.kt
deleted file mode 100644
index 4ab15ae2..00000000
--- a/native-modules/native-logger/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelogger/nativeloggerOnLoad.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-///
-/// nativeloggerOnLoad.kt
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-package com.margelo.nitro.nativelogger
-
-import android.util.Log
-
-internal class nativeloggerOnLoad {
- companion object {
- private const val TAG = "nativeloggerOnLoad"
- private var didLoad = false
- /**
- * Initializes the native part of "nativelogger".
- * This method is idempotent and can be called more than once.
- */
- @JvmStatic
- fun initializeNative() {
- if (didLoad) return
- try {
- Log.i(TAG, "Loading nativelogger C++ library...")
- System.loadLibrary("nativelogger")
- Log.i(TAG, "Successfully loaded nativelogger C++ library!")
- didLoad = true
- } catch (e: Error) {
- Log.e(TAG, "Failed to load nativelogger C++ library! Is it properly installed and linked? " +
- "Is the name correct? (see `CMakeLists.txt`, at `add_library(...)`)", e)
- throw e
- }
- }
- }
-}
diff --git a/native-modules/native-logger/nitrogen/generated/android/nativelogger+autolinking.cmake b/native-modules/native-logger/nitrogen/generated/android/nativelogger+autolinking.cmake
deleted file mode 100644
index 3708d6c2..00000000
--- a/native-modules/native-logger/nitrogen/generated/android/nativelogger+autolinking.cmake
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-# nativelogger+autolinking.cmake
-# This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-# https://github.com/mrousavy/nitro
-# Copyright © 2026 Marc Rousavy @ Margelo
-#
-
-# This is a CMake file that adds all files generated by Nitrogen
-# to the current CMake project.
-#
-# To use it, add this to your CMakeLists.txt:
-# ```cmake
-# include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/nativelogger+autolinking.cmake)
-# ```
-
-# Define a flag to check if we are building properly
-add_definitions(-DBUILDING_NATIVELOGGER_WITH_GENERATED_CMAKE_PROJECT)
-
-# Enable Raw Props parsing in react-native (for Nitro Views)
-add_definitions(-DRN_SERIALIZABLE_STATE)
-
-# Add all headers that were generated by Nitrogen
-include_directories(
- "../nitrogen/generated/shared/c++"
- "../nitrogen/generated/android/c++"
- "../nitrogen/generated/android/"
-)
-
-# Add all .cpp sources that were generated by Nitrogen
-target_sources(
- # CMake project name (Android C++ library name)
- nativelogger PRIVATE
- # Autolinking Setup
- ../nitrogen/generated/android/nativeloggerOnLoad.cpp
- # Shared Nitrogen C++ sources
- ../nitrogen/generated/shared/c++/HybridNativeLoggerSpec.cpp
- # Android-specific Nitrogen C++ sources
- ../nitrogen/generated/android/c++/JHybridNativeLoggerSpec.cpp
-)
-
-# From node_modules/react-native/ReactAndroid/cmake-utils/folly-flags.cmake
-# Used in node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake
-target_compile_definitions(
- nativelogger PRIVATE
- -DFOLLY_NO_CONFIG=1
- -DFOLLY_HAVE_CLOCK_GETTIME=1
- -DFOLLY_USE_LIBCPP=1
- -DFOLLY_CFG_NO_COROUTINES=1
- -DFOLLY_MOBILE=1
- -DFOLLY_HAVE_RECVMMSG=1
- -DFOLLY_HAVE_PTHREAD=1
- # Once we target android-23 above, we can comment
- # the following line. NDK uses GNU style stderror_r() after API 23.
- -DFOLLY_HAVE_XSI_STRERROR_R=1
-)
-
-# Add all libraries required by the generated specs
-find_package(fbjni REQUIRED) # <-- Used for communication between Java <-> C++
-find_package(ReactAndroid REQUIRED) # <-- Used to set up React Native bindings (e.g. CallInvoker/TurboModule)
-find_package(react-native-nitro-modules REQUIRED) # <-- Used to create all HybridObjects and use the Nitro core library
-
-# Link all libraries together
-target_link_libraries(
- nativelogger
- fbjni::fbjni # <-- Facebook C++ JNI helpers
- ReactAndroid::jsi # <-- RN: JSI
- react-native-nitro-modules::NitroModules # <-- NitroModules Core :)
-)
-
-# Link react-native (different prefab between RN 0.75 and RN 0.76)
-if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
- target_link_libraries(
- nativelogger
- ReactAndroid::reactnative # <-- RN: Native Modules umbrella prefab
- )
-else()
- target_link_libraries(
- nativelogger
- ReactAndroid::react_nativemodule_core # <-- RN: TurboModules Core
- )
-endif()
diff --git a/native-modules/native-logger/nitrogen/generated/android/nativelogger+autolinking.gradle b/native-modules/native-logger/nitrogen/generated/android/nativelogger+autolinking.gradle
deleted file mode 100644
index 1dc4380d..00000000
--- a/native-modules/native-logger/nitrogen/generated/android/nativelogger+autolinking.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-///
-/// nativelogger+autolinking.gradle
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-/// This is a Gradle file that adds all files generated by Nitrogen
-/// to the current Gradle project.
-///
-/// To use it, add this to your build.gradle:
-/// ```gradle
-/// apply from: '../nitrogen/generated/android/nativelogger+autolinking.gradle'
-/// ```
-
-logger.warn("[NitroModules] 🔥 nativelogger is boosted by nitro!")
-
-android {
- sourceSets {
- main {
- java.srcDirs += [
- // Nitrogen files
- "${project.projectDir}/../nitrogen/generated/android/kotlin"
- ]
- }
- }
-}
diff --git a/native-modules/native-logger/nitrogen/generated/android/nativeloggerOnLoad.cpp b/native-modules/native-logger/nitrogen/generated/android/nativeloggerOnLoad.cpp
deleted file mode 100644
index eb508d9a..00000000
--- a/native-modules/native-logger/nitrogen/generated/android/nativeloggerOnLoad.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-///
-/// nativeloggerOnLoad.cpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#ifndef BUILDING_NATIVELOGGER_WITH_GENERATED_CMAKE_PROJECT
-#error nativeloggerOnLoad.cpp is not being built with the autogenerated CMakeLists.txt project. Is a different CMakeLists.txt building this?
-#endif
-
-#include "nativeloggerOnLoad.hpp"
-
-#include
-#include
-#include
-
-#include "JHybridNativeLoggerSpec.hpp"
-#include
-
-namespace margelo::nitro::nativelogger {
-
-int initialize(JavaVM* vm) {
- using namespace margelo::nitro;
- using namespace margelo::nitro::nativelogger;
- using namespace facebook;
-
- return facebook::jni::initialize(vm, [] {
- // Register native JNI methods
- margelo::nitro::nativelogger::JHybridNativeLoggerSpec::registerNatives();
-
- // Register Nitro Hybrid Objects
- HybridObjectRegistry::registerHybridObjectConstructor(
- "NativeLogger",
- []() -> std::shared_ptr {
- static DefaultConstructableObject object("com/margelo/nitro/nativelogger/NativeLogger");
- auto instance = object.create();
- return instance->cthis()->shared();
- }
- );
- });
-}
-
-} // namespace margelo::nitro::nativelogger
diff --git a/native-modules/native-logger/nitrogen/generated/android/nativeloggerOnLoad.hpp b/native-modules/native-logger/nitrogen/generated/android/nativeloggerOnLoad.hpp
deleted file mode 100644
index 85752104..00000000
--- a/native-modules/native-logger/nitrogen/generated/android/nativeloggerOnLoad.hpp
+++ /dev/null
@@ -1,25 +0,0 @@
-///
-/// nativeloggerOnLoad.hpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#include
-#include
-
-namespace margelo::nitro::nativelogger {
-
- /**
- * Initializes the native (C++) part of nativelogger, and autolinks all Hybrid Objects.
- * Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`).
- * Example:
- * ```cpp (cpp-adapter.cpp)
- * JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
- * return margelo::nitro::nativelogger::initialize(vm);
- * }
- * ```
- */
- int initialize(JavaVM* vm);
-
-} // namespace margelo::nitro::nativelogger
diff --git a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger+autolinking.rb b/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger+autolinking.rb
deleted file mode 100644
index 86b779ef..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger+autolinking.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# ReactNativeNativeLogger+autolinking.rb
-# This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-# https://github.com/mrousavy/nitro
-# Copyright © 2026 Marc Rousavy @ Margelo
-#
-
-# This is a Ruby script that adds all files generated by Nitrogen
-# to the given podspec.
-#
-# To use it, add this to your .podspec:
-# ```ruby
-# Pod::Spec.new do |spec|
-# # ...
-#
-# # Add all files generated by Nitrogen
-# load 'nitrogen/generated/ios/ReactNativeNativeLogger+autolinking.rb'
-# add_nitrogen_files(spec)
-# end
-# ```
-
-def add_nitrogen_files(spec)
- Pod::UI.puts "[NitroModules] 🔥 ReactNativeNativeLogger is boosted by nitro!"
-
- spec.dependency "NitroModules"
-
- current_source_files = Array(spec.attributes_hash['source_files'])
- spec.source_files = current_source_files + [
- # Generated cross-platform specs
- "nitrogen/generated/shared/**/*.{h,hpp,c,cpp,swift}",
- # Generated bridges for the cross-platform specs
- "nitrogen/generated/ios/**/*.{h,hpp,c,cpp,mm,swift}",
- ]
-
- current_public_header_files = Array(spec.attributes_hash['public_header_files'])
- spec.public_header_files = current_public_header_files + [
- # Generated specs
- "nitrogen/generated/shared/**/*.{h,hpp}",
- # Swift to C++ bridging helpers
- "nitrogen/generated/ios/ReactNativeNativeLogger-Swift-Cxx-Bridge.hpp"
- ]
-
- current_private_header_files = Array(spec.attributes_hash['private_header_files'])
- spec.private_header_files = current_private_header_files + [
- # iOS specific specs
- "nitrogen/generated/ios/c++/**/*.{h,hpp}",
- # Views are framework-specific and should be private
- "nitrogen/generated/shared/**/views/**/*"
- ]
-
- current_pod_target_xcconfig = spec.attributes_hash['pod_target_xcconfig'] || {}
- spec.pod_target_xcconfig = current_pod_target_xcconfig.merge({
- # Use C++ 20
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
- # Enables C++ <-> Swift interop (by default it's only C)
- "SWIFT_OBJC_INTEROP_MODE" => "objcxx",
- # Enables stricter modular headers
- "DEFINES_MODULE" => "YES",
- })
-end
diff --git a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger-Swift-Cxx-Bridge.cpp b/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger-Swift-Cxx-Bridge.cpp
deleted file mode 100644
index ef806131..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger-Swift-Cxx-Bridge.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-///
-/// ReactNativeNativeLogger-Swift-Cxx-Bridge.cpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#include "ReactNativeNativeLogger-Swift-Cxx-Bridge.hpp"
-
-// Include C++ implementation defined types
-#include "HybridNativeLoggerSpecSwift.hpp"
-#include "ReactNativeNativeLogger-Swift-Cxx-Umbrella.hpp"
-#include
-
-namespace margelo::nitro::nativelogger::bridge::swift {
-
- // pragma MARK: std::function& /* result */)>
- Func_void_std__vector_std__string_ create_Func_void_std__vector_std__string_(void* NON_NULL swiftClosureWrapper) noexcept {
- auto swiftClosure = ReactNativeNativeLogger::Func_void_std__vector_std__string_::fromUnsafe(swiftClosureWrapper);
- return [swiftClosure = std::move(swiftClosure)](const std::vector& result) mutable -> void {
- swiftClosure.call(result);
- };
- }
-
- // pragma MARK: std::function
- Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
- auto swiftClosure = ReactNativeNativeLogger::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
- return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
- swiftClosure.call(error);
- };
- }
-
- // pragma MARK: std::function
- Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept {
- auto swiftClosure = ReactNativeNativeLogger::Func_void::fromUnsafe(swiftClosureWrapper);
- return [swiftClosure = std::move(swiftClosure)]() mutable -> void {
- swiftClosure.call();
- };
- }
-
- // pragma MARK: std::shared_ptr
- std::shared_ptr create_std__shared_ptr_HybridNativeLoggerSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
- ReactNativeNativeLogger::HybridNativeLoggerSpec_cxx swiftPart = ReactNativeNativeLogger::HybridNativeLoggerSpec_cxx::fromUnsafe(swiftUnsafePointer);
- return std::make_shared(swiftPart);
- }
- void* NON_NULL get_std__shared_ptr_HybridNativeLoggerSpec_(std__shared_ptr_HybridNativeLoggerSpec_ cppType) {
- std::shared_ptr swiftWrapper = std::dynamic_pointer_cast(cppType);
- #ifdef NITRO_DEBUG
- if (swiftWrapper == nullptr) [[unlikely]] {
- throw std::runtime_error("Class \"HybridNativeLoggerSpec\" is not implemented in Swift!");
- }
- #endif
- ReactNativeNativeLogger::HybridNativeLoggerSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
- return swiftPart.toUnsafe();
- }
-
-} // namespace margelo::nitro::nativelogger::bridge::swift
diff --git a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger-Swift-Cxx-Bridge.hpp b/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger-Swift-Cxx-Bridge.hpp
deleted file mode 100644
index eafd2d0f..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger-Swift-Cxx-Bridge.hpp
+++ /dev/null
@@ -1,184 +0,0 @@
-///
-/// ReactNativeNativeLogger-Swift-Cxx-Bridge.hpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#pragma once
-
-// Forward declarations of C++ defined types
-// Forward declaration of `HybridNativeLoggerSpec` to properly resolve imports.
-namespace margelo::nitro::nativelogger { class HybridNativeLoggerSpec; }
-
-// Forward declarations of Swift defined types
-// Forward declaration of `HybridNativeLoggerSpec_cxx` to properly resolve imports.
-namespace ReactNativeNativeLogger { class HybridNativeLoggerSpec_cxx; }
-
-// Include C++ defined types
-#include "HybridNativeLoggerSpec.hpp"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-/**
- * Contains specialized versions of C++ templated types so they can be accessed from Swift,
- * as well as helper functions to interact with those C++ types from Swift.
- */
-namespace margelo::nitro::nativelogger::bridge::swift {
-
- // pragma MARK: std::vector
- /**
- * Specialized version of `std::vector`.
- */
- using std__vector_std__string_ = std::vector;
- inline std::vector create_std__vector_std__string_(size_t size) noexcept {
- std::vector vector;
- vector.reserve(size);
- return vector;
- }
-
- // pragma MARK: std::shared_ptr>>
- /**
- * Specialized version of `std::shared_ptr>>`.
- */
- using std__shared_ptr_Promise_std__vector_std__string___ = std::shared_ptr>>;
- inline std::shared_ptr>> create_std__shared_ptr_Promise_std__vector_std__string___() noexcept {
- return Promise>::create();
- }
- inline PromiseHolder> wrap_std__shared_ptr_Promise_std__vector_std__string___(std::shared_ptr>> promise) noexcept {
- return PromiseHolder>(std::move(promise));
- }
-
- // pragma MARK: std::function& /* result */)>
- /**
- * Specialized version of `std::function&)>`.
- */
- using Func_void_std__vector_std__string_ = std::function& /* result */)>;
- /**
- * Wrapper class for a `std::function& / * result * /)>`, this can be used from Swift.
- */
- class Func_void_std__vector_std__string__Wrapper final {
- public:
- explicit Func_void_std__vector_std__string__Wrapper(std::function& /* result */)>&& func): _function(std::make_unique& /* result */)>>(std::move(func))) {}
- inline void call(std::vector result) const noexcept {
- _function->operator()(result);
- }
- private:
- std::unique_ptr& /* result */)>> _function;
- } SWIFT_NONCOPYABLE;
- Func_void_std__vector_std__string_ create_Func_void_std__vector_std__string_(void* NON_NULL swiftClosureWrapper) noexcept;
- inline Func_void_std__vector_std__string__Wrapper wrap_Func_void_std__vector_std__string_(Func_void_std__vector_std__string_ value) noexcept {
- return Func_void_std__vector_std__string__Wrapper(std::move(value));
- }
-
- // pragma MARK: std::function
- /**
- * Specialized version of `std::function`.
- */
- using Func_void_std__exception_ptr = std::function;
- /**
- * Wrapper class for a `std::function`, this can be used from Swift.
- */
- class Func_void_std__exception_ptr_Wrapper final {
- public:
- explicit Func_void_std__exception_ptr_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {}
- inline void call(std::exception_ptr error) const noexcept {
- _function->operator()(error);
- }
- private:
- std::unique_ptr> _function;
- } SWIFT_NONCOPYABLE;
- Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
- inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
- return Func_void_std__exception_ptr_Wrapper(std::move(value));
- }
-
- // pragma MARK: std::shared_ptr>
- /**
- * Specialized version of `std::shared_ptr>`.
- */
- using std__shared_ptr_Promise_void__ = std::shared_ptr>;
- inline std::shared_ptr> create_std__shared_ptr_Promise_void__() noexcept {
- return Promise::create();
- }
- inline PromiseHolder wrap_std__shared_ptr_Promise_void__(std::shared_ptr> promise) noexcept {
- return PromiseHolder(std::move(promise));
- }
-
- // pragma MARK: std::function
- /**
- * Specialized version of `std::function`.
- */
- using Func_void = std::function;
- /**
- * Wrapper class for a `std::function`, this can be used from Swift.
- */
- class Func_void_Wrapper final {
- public:
- explicit Func_void_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {}
- inline void call() const noexcept {
- _function->operator()();
- }
- private:
- std::unique_ptr> _function;
- } SWIFT_NONCOPYABLE;
- Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
- inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
- return Func_void_Wrapper(std::move(value));
- }
-
- // pragma MARK: std::shared_ptr
- /**
- * Specialized version of `std::shared_ptr`.
- */
- using std__shared_ptr_HybridNativeLoggerSpec_ = std::shared_ptr;
- std::shared_ptr create_std__shared_ptr_HybridNativeLoggerSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
- void* NON_NULL get_std__shared_ptr_HybridNativeLoggerSpec_(std__shared_ptr_HybridNativeLoggerSpec_ cppType);
-
- // pragma MARK: std::weak_ptr
- using std__weak_ptr_HybridNativeLoggerSpec_ = std::weak_ptr;
- inline std__weak_ptr_HybridNativeLoggerSpec_ weakify_std__shared_ptr_HybridNativeLoggerSpec_(const std::shared_ptr& strong) noexcept { return strong; }
-
- // pragma MARK: Result
- using Result_void_ = Result;
- inline Result_void_ create_Result_void_() noexcept {
- return Result::withValue();
- }
- inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
- return Result::withError(error);
- }
-
- // pragma MARK: Result
- using Result_std__string_ = Result;
- inline Result_std__string_ create_Result_std__string_(const std::string& value) noexcept {
- return Result::withValue(value);
- }
- inline Result_std__string_ create_Result_std__string_(const std::exception_ptr& error) noexcept {
- return Result::withError(error);
- }
-
- // pragma MARK: Result>>>
- using Result_std__shared_ptr_Promise_std__vector_std__string____ = Result>>>;
- inline Result_std__shared_ptr_Promise_std__vector_std__string____ create_Result_std__shared_ptr_Promise_std__vector_std__string____(const std::shared_ptr>>& value) noexcept {
- return Result>>>::withValue(value);
- }
- 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 {
- return Result>>>::withError(error);
- }
-
- // pragma MARK: Result>>
- using Result_std__shared_ptr_Promise_void___ = Result>>;
- inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr>& value) noexcept {
- return Result>>::withValue(value);
- }
- inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
- return Result>>::withError(error);
- }
-
-} // namespace margelo::nitro::nativelogger::bridge::swift
diff --git a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger-Swift-Cxx-Umbrella.hpp b/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger-Swift-Cxx-Umbrella.hpp
deleted file mode 100644
index e9c13206..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLogger-Swift-Cxx-Umbrella.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-///
-/// ReactNativeNativeLogger-Swift-Cxx-Umbrella.hpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#pragma once
-
-// Forward declarations of C++ defined types
-// Forward declaration of `HybridNativeLoggerSpec` to properly resolve imports.
-namespace margelo::nitro::nativelogger { class HybridNativeLoggerSpec; }
-
-// Include C++ defined types
-#include "HybridNativeLoggerSpec.hpp"
-#include
-#include
-#include
-#include
-#include
-#include
-
-// C++ helpers for Swift
-#include "ReactNativeNativeLogger-Swift-Cxx-Bridge.hpp"
-
-// Common C++ types used in Swift
-#include
-#include
-#include
-#include
-
-// Forward declarations of Swift defined types
-// Forward declaration of `HybridNativeLoggerSpec_cxx` to properly resolve imports.
-namespace ReactNativeNativeLogger { class HybridNativeLoggerSpec_cxx; }
-
-// Include Swift defined types
-#if __has_include("ReactNativeNativeLogger-Swift.h")
-// This header is generated by Xcode/Swift on every app build.
-// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "ReactNativeNativeLogger".
-#include "ReactNativeNativeLogger-Swift.h"
-// Same as above, but used when building with frameworks (`use_frameworks`)
-#elif __has_include()
-#include
-#else
-#error ReactNativeNativeLogger's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "ReactNativeNativeLogger", and try building the app first.
-#endif
diff --git a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLoggerAutolinking.mm b/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLoggerAutolinking.mm
deleted file mode 100644
index f558f301..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLoggerAutolinking.mm
+++ /dev/null
@@ -1,33 +0,0 @@
-///
-/// ReactNativeNativeLoggerAutolinking.mm
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#import
-#import
-#import "ReactNativeNativeLogger-Swift-Cxx-Umbrella.hpp"
-#import
-
-#include "HybridNativeLoggerSpecSwift.hpp"
-
-@interface ReactNativeNativeLoggerAutolinking : NSObject
-@end
-
-@implementation ReactNativeNativeLoggerAutolinking
-
-+ (void) load {
- using namespace margelo::nitro;
- using namespace margelo::nitro::nativelogger;
-
- HybridObjectRegistry::registerHybridObjectConstructor(
- "NativeLogger",
- []() -> std::shared_ptr {
- std::shared_ptr hybridObject = ReactNativeNativeLogger::ReactNativeNativeLoggerAutolinking::createNativeLogger();
- return hybridObject;
- }
- );
-}
-
-@end
diff --git a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLoggerAutolinking.swift b/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLoggerAutolinking.swift
deleted file mode 100644
index c8c74781..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/ReactNativeNativeLoggerAutolinking.swift
+++ /dev/null
@@ -1,25 +0,0 @@
-///
-/// ReactNativeNativeLoggerAutolinking.swift
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-public final class ReactNativeNativeLoggerAutolinking {
- public typealias bridge = margelo.nitro.nativelogger.bridge.swift
-
- /**
- * Creates an instance of a Swift class that implements `HybridNativeLoggerSpec`,
- * and wraps it in a Swift class that can directly interop with C++ (`HybridNativeLoggerSpec_cxx`)
- *
- * This is generated by Nitrogen and will initialize the class specified
- * in the `"autolinking"` property of `nitro.json` (in this case, `NativeLogger`).
- */
- public static func createNativeLogger() -> bridge.std__shared_ptr_HybridNativeLoggerSpec_ {
- let hybridObject = NativeLogger()
- return { () -> bridge.std__shared_ptr_HybridNativeLoggerSpec_ in
- let __cxxWrapped = hybridObject.getCxxWrapper()
- return __cxxWrapped.getCxxPart()
- }()
- }
-}
diff --git a/native-modules/native-logger/nitrogen/generated/ios/c++/HybridNativeLoggerSpecSwift.cpp b/native-modules/native-logger/nitrogen/generated/ios/c++/HybridNativeLoggerSpecSwift.cpp
deleted file mode 100644
index 3950924d..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/c++/HybridNativeLoggerSpecSwift.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-///
-/// HybridNativeLoggerSpecSwift.cpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#include "HybridNativeLoggerSpecSwift.hpp"
-
-namespace margelo::nitro::nativelogger {
-} // namespace margelo::nitro::nativelogger
diff --git a/native-modules/native-logger/nitrogen/generated/ios/c++/HybridNativeLoggerSpecSwift.hpp b/native-modules/native-logger/nitrogen/generated/ios/c++/HybridNativeLoggerSpecSwift.hpp
deleted file mode 100644
index 1412944c..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/c++/HybridNativeLoggerSpecSwift.hpp
+++ /dev/null
@@ -1,100 +0,0 @@
-///
-/// HybridNativeLoggerSpecSwift.hpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#pragma once
-
-#include "HybridNativeLoggerSpec.hpp"
-
-// Forward declaration of `HybridNativeLoggerSpec_cxx` to properly resolve imports.
-namespace ReactNativeNativeLogger { class HybridNativeLoggerSpec_cxx; }
-
-
-
-#include
-#include
-#include
-
-#include "ReactNativeNativeLogger-Swift-Cxx-Umbrella.hpp"
-
-namespace margelo::nitro::nativelogger {
-
- /**
- * The C++ part of HybridNativeLoggerSpec_cxx.swift.
- *
- * HybridNativeLoggerSpecSwift (C++) accesses HybridNativeLoggerSpec_cxx (Swift), and might
- * contain some additional bridging code for C++ <> Swift interop.
- *
- * Since this obviously introduces an overhead, I hope at some point in
- * the future, HybridNativeLoggerSpec_cxx can directly inherit from the C++ class HybridNativeLoggerSpec
- * to simplify the whole structure and memory management.
- */
- class HybridNativeLoggerSpecSwift: public virtual HybridNativeLoggerSpec {
- public:
- // Constructor from a Swift instance
- explicit HybridNativeLoggerSpecSwift(const ReactNativeNativeLogger::HybridNativeLoggerSpec_cxx& swiftPart):
- HybridObject(HybridNativeLoggerSpec::TAG),
- _swiftPart(swiftPart) { }
-
- public:
- // Get the Swift part
- inline ReactNativeNativeLogger::HybridNativeLoggerSpec_cxx& getSwiftPart() noexcept {
- return _swiftPart;
- }
-
- public:
- inline size_t getExternalMemorySize() noexcept override {
- return _swiftPart.getMemorySize();
- }
- void dispose() noexcept override {
- _swiftPart.dispose();
- }
- std::string toString() override {
- return _swiftPart.toString();
- }
-
- public:
- // Properties
-
-
- public:
- // Methods
- inline void write(double level, const std::string& msg) override {
- auto __result = _swiftPart.write(std::forward(level), msg);
- if (__result.hasError()) [[unlikely]] {
- std::rethrow_exception(__result.error());
- }
- }
- inline std::string getLogDirectory() override {
- auto __result = _swiftPart.getLogDirectory();
- if (__result.hasError()) [[unlikely]] {
- std::rethrow_exception(__result.error());
- }
- auto __value = std::move(__result.value());
- return __value;
- }
- inline std::shared_ptr>> getLogFilePaths() override {
- auto __result = _swiftPart.getLogFilePaths();
- if (__result.hasError()) [[unlikely]] {
- std::rethrow_exception(__result.error());
- }
- auto __value = std::move(__result.value());
- return __value;
- }
- inline std::shared_ptr> deleteLogFiles() override {
- auto __result = _swiftPart.deleteLogFiles();
- if (__result.hasError()) [[unlikely]] {
- std::rethrow_exception(__result.error());
- }
- auto __value = std::move(__result.value());
- return __value;
- }
-
- private:
- ReactNativeNativeLogger::HybridNativeLoggerSpec_cxx _swiftPart;
- };
-
-} // namespace margelo::nitro::nativelogger
diff --git a/native-modules/native-logger/nitrogen/generated/ios/swift/Func_void.swift b/native-modules/native-logger/nitrogen/generated/ios/swift/Func_void.swift
deleted file mode 100644
index f3dd3158..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/swift/Func_void.swift
+++ /dev/null
@@ -1,47 +0,0 @@
-///
-/// Func_void.swift
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-import Foundation
-import NitroModules
-
-/**
- * Wraps a Swift `() -> Void` as a class.
- * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
- */
-public final class Func_void {
- public typealias bridge = margelo.nitro.nativelogger.bridge.swift
-
- private let closure: () -> Void
-
- public init(_ closure: @escaping () -> Void) {
- self.closure = closure
- }
-
- @inline(__always)
- public func call() -> Void {
- self.closure()
- }
-
- /**
- * Casts this instance to a retained unsafe raw pointer.
- * This acquires one additional strong reference on the object!
- */
- @inline(__always)
- public func toUnsafe() -> UnsafeMutableRawPointer {
- return Unmanaged.passRetained(self).toOpaque()
- }
-
- /**
- * Casts an unsafe pointer to a `Func_void`.
- * The pointer has to be a retained opaque `Unmanaged`.
- * This removes one strong reference from the object!
- */
- @inline(__always)
- public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void {
- return Unmanaged.fromOpaque(pointer).takeRetainedValue()
- }
-}
diff --git a/native-modules/native-logger/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift b/native-modules/native-logger/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift
deleted file mode 100644
index 18121cab..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift
+++ /dev/null
@@ -1,47 +0,0 @@
-///
-/// Func_void_std__exception_ptr.swift
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-import Foundation
-import NitroModules
-
-/**
- * Wraps a Swift `(_ error: Error) -> Void` as a class.
- * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
- */
-public final class Func_void_std__exception_ptr {
- public typealias bridge = margelo.nitro.nativelogger.bridge.swift
-
- private let closure: (_ error: Error) -> Void
-
- public init(_ closure: @escaping (_ error: Error) -> Void) {
- self.closure = closure
- }
-
- @inline(__always)
- public func call(error: std.exception_ptr) -> Void {
- self.closure(RuntimeError.from(cppError: error))
- }
-
- /**
- * Casts this instance to a retained unsafe raw pointer.
- * This acquires one additional strong reference on the object!
- */
- @inline(__always)
- public func toUnsafe() -> UnsafeMutableRawPointer {
- return Unmanaged.passRetained(self).toOpaque()
- }
-
- /**
- * Casts an unsafe pointer to a `Func_void_std__exception_ptr`.
- * The pointer has to be a retained opaque `Unmanaged`.
- * This removes one strong reference from the object!
- */
- @inline(__always)
- public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__exception_ptr {
- return Unmanaged.fromOpaque(pointer).takeRetainedValue()
- }
-}
diff --git a/native-modules/native-logger/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift b/native-modules/native-logger/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift
deleted file mode 100644
index d07f3f0a..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift
+++ /dev/null
@@ -1,47 +0,0 @@
-///
-/// Func_void_std__vector_std__string_.swift
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-import Foundation
-import NitroModules
-
-/**
- * Wraps a Swift `(_ value: [String]) -> Void` as a class.
- * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
- */
-public final class Func_void_std__vector_std__string_ {
- public typealias bridge = margelo.nitro.nativelogger.bridge.swift
-
- private let closure: (_ value: [String]) -> Void
-
- public init(_ closure: @escaping (_ value: [String]) -> Void) {
- self.closure = closure
- }
-
- @inline(__always)
- public func call(value: bridge.std__vector_std__string_) -> Void {
- self.closure(value.map({ __item in String(__item) }))
- }
-
- /**
- * Casts this instance to a retained unsafe raw pointer.
- * This acquires one additional strong reference on the object!
- */
- @inline(__always)
- public func toUnsafe() -> UnsafeMutableRawPointer {
- return Unmanaged.passRetained(self).toOpaque()
- }
-
- /**
- * Casts an unsafe pointer to a `Func_void_std__vector_std__string_`.
- * The pointer has to be a retained opaque `Unmanaged`.
- * This removes one strong reference from the object!
- */
- @inline(__always)
- public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__vector_std__string_ {
- return Unmanaged.fromOpaque(pointer).takeRetainedValue()
- }
-}
diff --git a/native-modules/native-logger/nitrogen/generated/ios/swift/HybridNativeLoggerSpec.swift b/native-modules/native-logger/nitrogen/generated/ios/swift/HybridNativeLoggerSpec.swift
deleted file mode 100644
index 1b27c96b..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/swift/HybridNativeLoggerSpec.swift
+++ /dev/null
@@ -1,59 +0,0 @@
-///
-/// HybridNativeLoggerSpec.swift
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-import Foundation
-import NitroModules
-
-/// See ``HybridNativeLoggerSpec``
-public protocol HybridNativeLoggerSpec_protocol: HybridObject {
- // Properties
-
-
- // Methods
- func write(level: Double, msg: String) throws -> Void
- func getLogDirectory() throws -> String
- func getLogFilePaths() throws -> Promise<[String]>
- func deleteLogFiles() throws -> Promise
-}
-
-public extension HybridNativeLoggerSpec_protocol {
- /// Default implementation of ``HybridObject.toString``
- func toString() -> String {
- return "[HybridObject NativeLogger]"
- }
-}
-
-/// See ``HybridNativeLoggerSpec``
-open class HybridNativeLoggerSpec_base {
- private weak var cxxWrapper: HybridNativeLoggerSpec_cxx? = nil
- public init() { }
- public func getCxxWrapper() -> HybridNativeLoggerSpec_cxx {
- #if DEBUG
- guard self is HybridNativeLoggerSpec else {
- fatalError("`self` is not a `HybridNativeLoggerSpec`! Did you accidentally inherit from `HybridNativeLoggerSpec_base` instead of `HybridNativeLoggerSpec`?")
- }
- #endif
- if let cxxWrapper = self.cxxWrapper {
- return cxxWrapper
- } else {
- let cxxWrapper = HybridNativeLoggerSpec_cxx(self as! HybridNativeLoggerSpec)
- self.cxxWrapper = cxxWrapper
- return cxxWrapper
- }
- }
-}
-
-/**
- * A Swift base-protocol representing the NativeLogger HybridObject.
- * Implement this protocol to create Swift-based instances of NativeLogger.
- * ```swift
- * class HybridNativeLogger : HybridNativeLoggerSpec {
- * // ...
- * }
- * ```
- */
-public typealias HybridNativeLoggerSpec = HybridNativeLoggerSpec_protocol & HybridNativeLoggerSpec_base
diff --git a/native-modules/native-logger/nitrogen/generated/ios/swift/HybridNativeLoggerSpec_cxx.swift b/native-modules/native-logger/nitrogen/generated/ios/swift/HybridNativeLoggerSpec_cxx.swift
deleted file mode 100644
index 16caad0e..00000000
--- a/native-modules/native-logger/nitrogen/generated/ios/swift/HybridNativeLoggerSpec_cxx.swift
+++ /dev/null
@@ -1,186 +0,0 @@
-///
-/// HybridNativeLoggerSpec_cxx.swift
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-import Foundation
-import NitroModules
-
-/**
- * A class implementation that bridges HybridNativeLoggerSpec over to C++.
- * In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
- *
- * Also, some Swift types need to be bridged with special handling:
- * - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
- * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
- * - Throwing methods need to be wrapped with a Result type, as exceptions cannot be propagated to C++
- */
-open class HybridNativeLoggerSpec_cxx {
- /**
- * The Swift <> C++ bridge's namespace (`margelo::nitro::nativelogger::bridge::swift`)
- * from `ReactNativeNativeLogger-Swift-Cxx-Bridge.hpp`.
- * This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
- */
- public typealias bridge = margelo.nitro.nativelogger.bridge.swift
-
- /**
- * Holds an instance of the `HybridNativeLoggerSpec` Swift protocol.
- */
- private var __implementation: any HybridNativeLoggerSpec
-
- /**
- * Holds a weak pointer to the C++ class that wraps the Swift class.
- */
- private var __cxxPart: bridge.std__weak_ptr_HybridNativeLoggerSpec_
-
- /**
- * Create a new `HybridNativeLoggerSpec_cxx` that wraps the given `HybridNativeLoggerSpec`.
- * All properties and methods bridge to C++ types.
- */
- public init(_ implementation: any HybridNativeLoggerSpec) {
- self.__implementation = implementation
- self.__cxxPart = .init()
- /* no base class */
- }
-
- /**
- * Get the actual `HybridNativeLoggerSpec` instance this class wraps.
- */
- @inline(__always)
- public func getHybridNativeLoggerSpec() -> any HybridNativeLoggerSpec {
- return __implementation
- }
-
- /**
- * Casts this instance to a retained unsafe raw pointer.
- * This acquires one additional strong reference on the object!
- */
- public func toUnsafe() -> UnsafeMutableRawPointer {
- return Unmanaged.passRetained(self).toOpaque()
- }
-
- /**
- * Casts an unsafe pointer to a `HybridNativeLoggerSpec_cxx`.
- * The pointer has to be a retained opaque `Unmanaged`.
- * This removes one strong reference from the object!
- */
- public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridNativeLoggerSpec_cxx {
- return Unmanaged.fromOpaque(pointer).takeRetainedValue()
- }
-
- /**
- * Gets (or creates) the C++ part of this Hybrid Object.
- * The C++ part is a `std::shared_ptr`.
- */
- public func getCxxPart() -> bridge.std__shared_ptr_HybridNativeLoggerSpec_ {
- let cachedCxxPart = self.__cxxPart.lock()
- if Bool(fromCxx: cachedCxxPart) {
- return cachedCxxPart
- } else {
- let newCxxPart = bridge.create_std__shared_ptr_HybridNativeLoggerSpec_(self.toUnsafe())
- __cxxPart = bridge.weakify_std__shared_ptr_HybridNativeLoggerSpec_(newCxxPart)
- return newCxxPart
- }
- }
-
-
-
- /**
- * Get the memory size of the Swift class (plus size of any other allocations)
- * so the JS VM can properly track it and garbage-collect the JS object if needed.
- */
- @inline(__always)
- public var memorySize: Int {
- return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
- }
-
- /**
- * Call dispose() on the Swift class.
- * This _may_ be called manually from JS.
- */
- @inline(__always)
- public func dispose() {
- self.__implementation.dispose()
- }
-
- /**
- * Call toString() on the Swift class.
- */
- @inline(__always)
- public func toString() -> String {
- return self.__implementation.toString()
- }
-
- // Properties
-
-
- // Methods
- @inline(__always)
- public final func write(level: Double, msg: std.string) -> bridge.Result_void_ {
- do {
- try self.__implementation.write(level: level, msg: String(msg))
- return bridge.create_Result_void_()
- } catch (let __error) {
- let __exceptionPtr = __error.toCpp()
- return bridge.create_Result_void_(__exceptionPtr)
- }
- }
-
- @inline(__always)
- public final func getLogDirectory() -> bridge.Result_std__string_ {
- do {
- let __result = try self.__implementation.getLogDirectory()
- let __resultCpp = std.string(__result)
- return bridge.create_Result_std__string_(__resultCpp)
- } catch (let __error) {
- let __exceptionPtr = __error.toCpp()
- return bridge.create_Result_std__string_(__exceptionPtr)
- }
- }
-
- @inline(__always)
- public final func getLogFilePaths() -> bridge.Result_std__shared_ptr_Promise_std__vector_std__string____ {
- do {
- let __result = try self.__implementation.getLogFilePaths()
- let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__vector_std__string___ in
- let __promise = bridge.create_std__shared_ptr_Promise_std__vector_std__string___()
- let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__vector_std__string___(__promise)
- __result
- .then({ __result in __promiseHolder.resolve({ () -> bridge.std__vector_std__string_ in
- var __vector = bridge.create_std__vector_std__string_(__result.count)
- for __item in __result {
- __vector.push_back(std.string(__item))
- }
- return __vector
- }()) })
- .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
- return __promise
- }()
- return bridge.create_Result_std__shared_ptr_Promise_std__vector_std__string____(__resultCpp)
- } catch (let __error) {
- let __exceptionPtr = __error.toCpp()
- return bridge.create_Result_std__shared_ptr_Promise_std__vector_std__string____(__exceptionPtr)
- }
- }
-
- @inline(__always)
- public final func deleteLogFiles() -> bridge.Result_std__shared_ptr_Promise_void___ {
- do {
- let __result = try self.__implementation.deleteLogFiles()
- let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
- let __promise = bridge.create_std__shared_ptr_Promise_void__()
- let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
- __result
- .then({ __result in __promiseHolder.resolve() })
- .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
- return __promise
- }()
- return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
- } catch (let __error) {
- let __exceptionPtr = __error.toCpp()
- return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
- }
- }
-}
diff --git a/native-modules/native-logger/nitrogen/generated/shared/c++/HybridNativeLoggerSpec.cpp b/native-modules/native-logger/nitrogen/generated/shared/c++/HybridNativeLoggerSpec.cpp
deleted file mode 100644
index 8fc30471..00000000
--- a/native-modules/native-logger/nitrogen/generated/shared/c++/HybridNativeLoggerSpec.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-///
-/// HybridNativeLoggerSpec.cpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#include "HybridNativeLoggerSpec.hpp"
-
-namespace margelo::nitro::nativelogger {
-
- void HybridNativeLoggerSpec::loadHybridMethods() {
- // load base methods/properties
- HybridObject::loadHybridMethods();
- // load custom methods/properties
- registerHybrids(this, [](Prototype& prototype) {
- prototype.registerHybridMethod("write", &HybridNativeLoggerSpec::write);
- prototype.registerHybridMethod("getLogDirectory", &HybridNativeLoggerSpec::getLogDirectory);
- prototype.registerHybridMethod("getLogFilePaths", &HybridNativeLoggerSpec::getLogFilePaths);
- prototype.registerHybridMethod("deleteLogFiles", &HybridNativeLoggerSpec::deleteLogFiles);
- });
- }
-
-} // namespace margelo::nitro::nativelogger
diff --git a/native-modules/native-logger/nitrogen/generated/shared/c++/HybridNativeLoggerSpec.hpp b/native-modules/native-logger/nitrogen/generated/shared/c++/HybridNativeLoggerSpec.hpp
deleted file mode 100644
index fb1463b5..00000000
--- a/native-modules/native-logger/nitrogen/generated/shared/c++/HybridNativeLoggerSpec.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-///
-/// HybridNativeLoggerSpec.hpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#pragma once
-
-#if __has_include()
-#include
-#else
-#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
-#endif
-
-
-
-#include
-#include
-#include
-
-namespace margelo::nitro::nativelogger {
-
- using namespace margelo::nitro;
-
- /**
- * An abstract base class for `NativeLogger`
- * Inherit this class to create instances of `HybridNativeLoggerSpec` in C++.
- * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
- * @example
- * ```cpp
- * class HybridNativeLogger: public HybridNativeLoggerSpec {
- * public:
- * HybridNativeLogger(...): HybridObject(TAG) { ... }
- * // ...
- * };
- * ```
- */
- class HybridNativeLoggerSpec: public virtual HybridObject {
- public:
- // Constructor
- explicit HybridNativeLoggerSpec(): HybridObject(TAG) { }
-
- // Destructor
- ~HybridNativeLoggerSpec() override = default;
-
- public:
- // Properties
-
-
- public:
- // Methods
- virtual void write(double level, const std::string& msg) = 0;
- virtual std::string getLogDirectory() = 0;
- virtual std::shared_ptr>> getLogFilePaths() = 0;
- virtual std::shared_ptr> deleteLogFiles() = 0;
-
- protected:
- // Hybrid Setup
- void loadHybridMethods() override;
-
- protected:
- // Tag for logging
- static constexpr auto TAG = "NativeLogger";
- };
-
-} // namespace margelo::nitro::nativelogger
diff --git a/native-modules/native-logger/package.json b/native-modules/native-logger/package.json
index bc8c0815..48f994da 100644
--- a/native-modules/native-logger/package.json
+++ b/native-modules/native-logger/package.json
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-native-logger",
- "version": "1.1.36",
+ "version": "1.1.38",
"description": "react-native-native-logger",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
diff --git a/native-modules/react-native-app-update/nitrogen/generated/.gitattributes b/native-modules/react-native-app-update/nitrogen/generated/.gitattributes
deleted file mode 100644
index fb7a0d5a..00000000
--- a/native-modules/react-native-app-update/nitrogen/generated/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-** linguist-generated=true
diff --git a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JAppUpdateDownloadParams.hpp b/native-modules/react-native-app-update/nitrogen/generated/android/c++/JAppUpdateDownloadParams.hpp
deleted file mode 100644
index 9cfdb7c9..00000000
--- a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JAppUpdateDownloadParams.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-///
-/// JAppUpdateDownloadParams.hpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#pragma once
-
-#include
-#include "AppUpdateDownloadParams.hpp"
-
-#include
-
-namespace margelo::nitro::reactnativeappupdate {
-
- using namespace facebook;
-
- /**
- * The C++ JNI bridge between the C++ struct "AppUpdateDownloadParams" and the the Kotlin data class "AppUpdateDownloadParams".
- */
- struct JAppUpdateDownloadParams final: public jni::JavaClass {
- public:
- static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/reactnativeappupdate/AppUpdateDownloadParams;";
-
- public:
- /**
- * Convert this Java/Kotlin-based struct to the C++ struct AppUpdateDownloadParams by copying all values to C++.
- */
- [[maybe_unused]]
- [[nodiscard]]
- AppUpdateDownloadParams toCpp() const {
- static const auto clazz = javaClassStatic();
- static const auto fieldDownloadUrl = clazz->getField("downloadUrl");
- jni::local_ref downloadUrl = this->getFieldValue(fieldDownloadUrl);
- static const auto fieldNotificationTitle = clazz->getField("notificationTitle");
- jni::local_ref notificationTitle = this->getFieldValue(fieldNotificationTitle);
- static const auto fieldFileSize = clazz->getField("fileSize");
- double fileSize = this->getFieldValue(fieldFileSize);
- return AppUpdateDownloadParams(
- downloadUrl->toStdString(),
- notificationTitle->toStdString(),
- fileSize
- );
- }
-
- public:
- /**
- * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
- */
- [[maybe_unused]]
- static jni::local_ref fromCpp(const AppUpdateDownloadParams& value) {
- using JSignature = JAppUpdateDownloadParams(jni::alias_ref, jni::alias_ref, double);
- static const auto clazz = javaClassStatic();
- static const auto create = clazz->getStaticMethod("fromCpp");
- return create(
- clazz,
- jni::make_jstring(value.downloadUrl),
- jni::make_jstring(value.notificationTitle),
- value.fileSize
- );
- }
- };
-
-} // namespace margelo::nitro::reactnativeappupdate
diff --git a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JAppUpdateFileParams.hpp b/native-modules/react-native-app-update/nitrogen/generated/android/c++/JAppUpdateFileParams.hpp
deleted file mode 100644
index bbecd308..00000000
--- a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JAppUpdateFileParams.hpp
+++ /dev/null
@@ -1,57 +0,0 @@
-///
-/// JAppUpdateFileParams.hpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#pragma once
-
-#include
-#include "AppUpdateFileParams.hpp"
-
-#include
-
-namespace margelo::nitro::reactnativeappupdate {
-
- using namespace facebook;
-
- /**
- * The C++ JNI bridge between the C++ struct "AppUpdateFileParams" and the the Kotlin data class "AppUpdateFileParams".
- */
- struct JAppUpdateFileParams final: public jni::JavaClass {
- public:
- static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/reactnativeappupdate/AppUpdateFileParams;";
-
- public:
- /**
- * Convert this Java/Kotlin-based struct to the C++ struct AppUpdateFileParams by copying all values to C++.
- */
- [[maybe_unused]]
- [[nodiscard]]
- AppUpdateFileParams toCpp() const {
- static const auto clazz = javaClassStatic();
- static const auto fieldDownloadUrl = clazz->getField("downloadUrl");
- jni::local_ref downloadUrl = this->getFieldValue(fieldDownloadUrl);
- return AppUpdateFileParams(
- downloadUrl->toStdString()
- );
- }
-
- public:
- /**
- * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
- */
- [[maybe_unused]]
- static jni::local_ref fromCpp(const AppUpdateFileParams& value) {
- using JSignature = JAppUpdateFileParams(jni::alias_ref);
- static const auto clazz = javaClassStatic();
- static const auto create = clazz->getStaticMethod("fromCpp");
- return create(
- clazz,
- jni::make_jstring(value.downloadUrl)
- );
- }
- };
-
-} // namespace margelo::nitro::reactnativeappupdate
diff --git a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JDownloadEvent.hpp b/native-modules/react-native-app-update/nitrogen/generated/android/c++/JDownloadEvent.hpp
deleted file mode 100644
index f2e24881..00000000
--- a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JDownloadEvent.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-///
-/// JDownloadEvent.hpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#pragma once
-
-#include
-#include "DownloadEvent.hpp"
-
-#include
-
-namespace margelo::nitro::reactnativeappupdate {
-
- using namespace facebook;
-
- /**
- * The C++ JNI bridge between the C++ struct "DownloadEvent" and the the Kotlin data class "DownloadEvent".
- */
- struct JDownloadEvent final: public jni::JavaClass {
- public:
- static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/reactnativeappupdate/DownloadEvent;";
-
- public:
- /**
- * Convert this Java/Kotlin-based struct to the C++ struct DownloadEvent by copying all values to C++.
- */
- [[maybe_unused]]
- [[nodiscard]]
- DownloadEvent toCpp() const {
- static const auto clazz = javaClassStatic();
- static const auto fieldType = clazz->getField("type");
- jni::local_ref type = this->getFieldValue(fieldType);
- static const auto fieldProgress = clazz->getField("progress");
- double progress = this->getFieldValue(fieldProgress);
- static const auto fieldMessage = clazz->getField("message");
- jni::local_ref message = this->getFieldValue(fieldMessage);
- return DownloadEvent(
- type->toStdString(),
- progress,
- message->toStdString()
- );
- }
-
- public:
- /**
- * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
- */
- [[maybe_unused]]
- static jni::local_ref fromCpp(const DownloadEvent& value) {
- using JSignature = JDownloadEvent(jni::alias_ref, double, jni::alias_ref);
- static const auto clazz = javaClassStatic();
- static const auto create = clazz->getStaticMethod("fromCpp");
- return create(
- clazz,
- jni::make_jstring(value.type),
- value.progress,
- jni::make_jstring(value.message)
- );
- }
- };
-
-} // namespace margelo::nitro::reactnativeappupdate
diff --git a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JFunc_void_DownloadEvent.hpp b/native-modules/react-native-app-update/nitrogen/generated/android/c++/JFunc_void_DownloadEvent.hpp
deleted file mode 100644
index 07cfd9b2..00000000
--- a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JFunc_void_DownloadEvent.hpp
+++ /dev/null
@@ -1,78 +0,0 @@
-///
-/// JFunc_void_DownloadEvent.hpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#pragma once
-
-#include
-#include
-
-#include "DownloadEvent.hpp"
-#include
-#include
-#include "JDownloadEvent.hpp"
-#include
-
-namespace margelo::nitro::reactnativeappupdate {
-
- using namespace facebook;
-
- /**
- * Represents the Java/Kotlin callback `(event: DownloadEvent) -> Unit`.
- * This can be passed around between C++ and Java/Kotlin.
- */
- struct JFunc_void_DownloadEvent: public jni::JavaClass {
- public:
- static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/reactnativeappupdate/Func_void_DownloadEvent;";
-
- public:
- /**
- * Invokes the function this `JFunc_void_DownloadEvent` instance holds through JNI.
- */
- void invoke(const DownloadEvent& event) const {
- static const auto method = javaClassStatic()->getMethod /* event */)>("invoke");
- method(self(), JDownloadEvent::fromCpp(event));
- }
- };
-
- /**
- * An implementation of Func_void_DownloadEvent that is backed by a C++ implementation (using `std::function<...>`)
- */
- class JFunc_void_DownloadEvent_cxx final: public jni::HybridClass {
- public:
- static jni::local_ref fromCpp(const std::function& func) {
- return JFunc_void_DownloadEvent_cxx::newObjectCxxArgs(func);
- }
-
- public:
- /**
- * Invokes the C++ `std::function<...>` this `JFunc_void_DownloadEvent_cxx` instance holds.
- */
- void invoke_cxx(jni::alias_ref event) {
- _func(event->toCpp());
- }
-
- public:
- [[nodiscard]]
- inline const std::function& getFunction() const {
- return _func;
- }
-
- public:
- static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/reactnativeappupdate/Func_void_DownloadEvent_cxx;";
- static void registerNatives() {
- registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_DownloadEvent_cxx::invoke_cxx)});
- }
-
- private:
- explicit JFunc_void_DownloadEvent_cxx(const std::function& func): _func(func) { }
-
- private:
- friend HybridBase;
- std::function _func;
- };
-
-} // namespace margelo::nitro::reactnativeappupdate
diff --git a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JHybridReactNativeAppUpdateSpec.cpp b/native-modules/react-native-app-update/nitrogen/generated/android/c++/JHybridReactNativeAppUpdateSpec.cpp
deleted file mode 100644
index 28434ee3..00000000
--- a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JHybridReactNativeAppUpdateSpec.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-///
-/// JHybridReactNativeAppUpdateSpec.cpp
-/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
-/// https://github.com/mrousavy/nitro
-/// Copyright © 2026 Marc Rousavy @ Margelo
-///
-
-#include "JHybridReactNativeAppUpdateSpec.hpp"
-
-// Forward declaration of `AppUpdateDownloadParams` to properly resolve imports.
-namespace margelo::nitro::reactnativeappupdate { struct AppUpdateDownloadParams; }
-// Forward declaration of `AppUpdateFileParams` to properly resolve imports.
-namespace margelo::nitro::reactnativeappupdate { struct AppUpdateFileParams; }
-// Forward declaration of `DownloadEvent` to properly resolve imports.
-namespace margelo::nitro::reactnativeappupdate { struct DownloadEvent; }
-
-#include
-#include
-#include "AppUpdateDownloadParams.hpp"
-#include "JAppUpdateDownloadParams.hpp"
-#include
-#include "AppUpdateFileParams.hpp"
-#include "JAppUpdateFileParams.hpp"
-#include "DownloadEvent.hpp"
-#include
-#include "JFunc_void_DownloadEvent.hpp"
-#include
-#include "JDownloadEvent.hpp"
-
-namespace margelo::nitro::reactnativeappupdate {
-
- jni::local_ref JHybridReactNativeAppUpdateSpec::initHybrid(jni::alias_ref jThis) {
- return makeCxxInstance(jThis);
- }
-
- void JHybridReactNativeAppUpdateSpec::registerNatives() {
- registerHybrid({
- makeNativeMethod("initHybrid", JHybridReactNativeAppUpdateSpec::initHybrid),
- });
- }
-
- size_t JHybridReactNativeAppUpdateSpec::getExternalMemorySize() noexcept {
- static const auto method = javaClassStatic()->getMethod("getMemorySize");
- return method(_javaPart);
- }
-
- void JHybridReactNativeAppUpdateSpec::dispose() noexcept {
- static const auto method = javaClassStatic()->getMethod("dispose");
- method(_javaPart);
- }
-
- std::string JHybridReactNativeAppUpdateSpec::toString() {
- static const auto method = javaClassStatic()->getMethod("toString");
- auto javaString = method(_javaPart);
- return javaString->toStdString();
- }
-
- // Properties
-
-
- // Methods
- std::shared_ptr> JHybridReactNativeAppUpdateSpec::downloadAPK(const AppUpdateDownloadParams& params) {
- static const auto method = javaClassStatic()->getMethod(jni::alias_ref /* params */)>("downloadAPK");
- auto __result = method(_javaPart, JAppUpdateDownloadParams::fromCpp(params));
- return [&]() {
- auto __promise = Promise::create();
- __result->cthis()->addOnResolvedListener([=](const jni::alias_ref& /* unit */) {
- __promise->resolve();
- });
- __result->cthis()->addOnRejectedListener([=](const jni::alias_ref& __throwable) {
- jni::JniException __jniError(__throwable);
- __promise->reject(std::make_exception_ptr(__jniError));
- });
- return __promise;
- }();
- }
- std::shared_ptr> JHybridReactNativeAppUpdateSpec::downloadASC(const AppUpdateFileParams& params) {
- static const auto method = javaClassStatic()->getMethod(jni::alias_ref /* params */)>("downloadASC");
- auto __result = method(_javaPart, JAppUpdateFileParams::fromCpp(params));
- return [&]() {
- auto __promise = Promise::create();
- __result->cthis()->addOnResolvedListener([=](const jni::alias_ref& /* unit */) {
- __promise->resolve();
- });
- __result->cthis()->addOnRejectedListener([=](const jni::alias_ref& __throwable) {
- jni::JniException __jniError(__throwable);
- __promise->reject(std::make_exception_ptr(__jniError));
- });
- return __promise;
- }();
- }
- std::shared_ptr> JHybridReactNativeAppUpdateSpec::verifyASC(const AppUpdateFileParams& params) {
- static const auto method = javaClassStatic()->getMethod(jni::alias_ref /* params */)>("verifyASC");
- auto __result = method(_javaPart, JAppUpdateFileParams::fromCpp(params));
- return [&]() {
- auto __promise = Promise::create();
- __result->cthis()->addOnResolvedListener([=](const jni::alias_ref& /* unit */) {
- __promise->resolve();
- });
- __result->cthis()->addOnRejectedListener([=](const jni::alias_ref& __throwable) {
- jni::JniException __jniError(__throwable);
- __promise->reject(std::make_exception_ptr(__jniError));
- });
- return __promise;
- }();
- }
- std::shared_ptr> JHybridReactNativeAppUpdateSpec::verifyAPK(const AppUpdateFileParams& params) {
- static const auto method = javaClassStatic()->getMethod(jni::alias_ref /* params */)>("verifyAPK");
- auto __result = method(_javaPart, JAppUpdateFileParams::fromCpp(params));
- return [&]() {
- auto __promise = Promise::create();
- __result->cthis()->addOnResolvedListener([=](const jni::alias_ref& /* unit */) {
- __promise->resolve();
- });
- __result->cthis()->addOnRejectedListener([=](const jni::alias_ref& __throwable) {
- jni::JniException __jniError(__throwable);
- __promise->reject(std::make_exception_ptr(__jniError));
- });
- return __promise;
- }();
- }
- std::shared_ptr> JHybridReactNativeAppUpdateSpec::installAPK(const AppUpdateFileParams& params) {
- static const auto method = javaClassStatic()->getMethod(jni::alias_ref /* params */)>("installAPK");
- auto __result = method(_javaPart, JAppUpdateFileParams::fromCpp(params));
- return [&]() {
- auto __promise = Promise::create();
- __result->cthis()->addOnResolvedListener([=](const jni::alias_ref