From 34b44c944888b2bdbcd3365342b893f8813505c4 Mon Sep 17 00:00:00 2001 From: huhuanming Date: Fri, 6 Mar 2026 21:31:17 +0800 Subject: [PATCH 1/3] feat(app-update,bundle-update): add sync isSkipGpgVerificationAllowed API --- .../ReactNativeAppUpdate.podspec | 8 ++++++++ .../reactnativeappupdate/ReactNativeAppUpdate.kt | 6 ++++++ .../ios/ReactNativeAppUpdate.swift | 10 ++++++++++ .../android/c++/JHybridReactNativeAppUpdateSpec.cpp | 5 +++++ .../android/c++/JHybridReactNativeAppUpdateSpec.hpp | 1 + .../HybridReactNativeAppUpdateSpec.kt | 4 ++++ .../ios/ReactNativeAppUpdate-Swift-Cxx-Bridge.hpp | 9 +++++++++ .../ios/c++/HybridReactNativeAppUpdateSpecSwift.hpp | 8 ++++++++ .../ios/swift/HybridReactNativeAppUpdateSpec.swift | 1 + .../swift/HybridReactNativeAppUpdateSpec_cxx.swift | 12 ++++++++++++ .../shared/c++/HybridReactNativeAppUpdateSpec.cpp | 1 + .../shared/c++/HybridReactNativeAppUpdateSpec.hpp | 1 + .../src/ReactNativeAppUpdate.nitro.ts | 1 + .../ReactNativeBundleUpdate.kt | 6 ++++++ .../ios/ReactNativeBundleUpdate.swift | 10 ++++++++++ .../c++/JHybridReactNativeBundleUpdateSpec.cpp | 5 +++++ .../c++/JHybridReactNativeBundleUpdateSpec.hpp | 1 + .../HybridReactNativeBundleUpdateSpec.kt | 4 ++++ .../ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.hpp | 9 +++++++++ .../c++/HybridReactNativeBundleUpdateSpecSwift.hpp | 8 ++++++++ .../swift/HybridReactNativeBundleUpdateSpec.swift | 1 + .../HybridReactNativeBundleUpdateSpec_cxx.swift | 12 ++++++++++++ .../shared/c++/HybridReactNativeBundleUpdateSpec.cpp | 1 + .../shared/c++/HybridReactNativeBundleUpdateSpec.hpp | 1 + .../src/ReactNativeBundleUpdate.nitro.ts | 1 + 25 files changed, 126 insertions(+) diff --git a/native-modules/react-native-app-update/ReactNativeAppUpdate.podspec b/native-modules/react-native-app-update/ReactNativeAppUpdate.podspec index f829b3a1..3274e35b 100644 --- a/native-modules/react-native-app-update/ReactNativeAppUpdate.podspec +++ b/native-modules/react-native-app-update/ReactNativeAppUpdate.podspec @@ -19,6 +19,14 @@ Pod::Spec.new do |s| "cpp/**/*.{hpp,cpp}", ] + # When ONEKEY_ALLOW_SKIP_GPG_VERIFICATION env var is set to a non-empty, non-'false' value, + # enable the ALLOW_SKIP_GPG_VERIFICATION Swift compilation condition. + if ENV['ONEKEY_ALLOW_SKIP_GPG_VERIFICATION'] && ENV['ONEKEY_ALLOW_SKIP_GPG_VERIFICATION'] != '' && ENV['ONEKEY_ALLOW_SKIP_GPG_VERIFICATION'] != 'false' + s.pod_target_xcconfig = { + 'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => '$(inherited) ALLOW_SKIP_GPG_VERIFICATION' + } + end + s.dependency 'React-jsi' s.dependency 'React-callinvoker' s.dependency 'ReactNativeNativeLogger' diff --git a/native-modules/react-native-app-update/android/src/main/java/com/margelo/nitro/reactnativeappupdate/ReactNativeAppUpdate.kt b/native-modules/react-native-app-update/android/src/main/java/com/margelo/nitro/reactnativeappupdate/ReactNativeAppUpdate.kt index bf3674c6..da579cc6 100644 --- a/native-modules/react-native-app-update/android/src/main/java/com/margelo/nitro/reactnativeappupdate/ReactNativeAppUpdate.kt +++ b/native-modules/react-native-app-update/android/src/main/java/com/margelo/nitro/reactnativeappupdate/ReactNativeAppUpdate.kt @@ -891,6 +891,12 @@ n2DMz6gqk326W6SFynYtvuiXo7wG4Cmn3SuIU8xfv9rJqunpZGYchMd7nZektmEJ } } + override fun isSkipGpgVerificationAllowed(): Boolean { + val result = BuildConfig.ALLOW_SKIP_GPG_VERIFICATION + OneKeyLog.info("AppUpdate", "isSkipGpgVerificationAllowed: result=$result") + return result + } + override fun clearCache(): Promise { return Promise.async { OneKeyLog.info("AppUpdate", "clearCache: starting cleanup...") diff --git a/native-modules/react-native-app-update/ios/ReactNativeAppUpdate.swift b/native-modules/react-native-app-update/ios/ReactNativeAppUpdate.swift index 78b7d6cf..24aa4c52 100644 --- a/native-modules/react-native-app-update/ios/ReactNativeAppUpdate.swift +++ b/native-modules/react-native-app-update/ios/ReactNativeAppUpdate.swift @@ -40,6 +40,16 @@ class ReactNativeAppUpdate: HybridReactNativeAppUpdateSpec { return Promise.resolved(withResult: false) } + func isSkipGpgVerificationAllowed() throws -> Bool { + #if ALLOW_SKIP_GPG_VERIFICATION + let result = true + #else + let result = false + #endif + OneKeyLog.info("AppUpdate", "isSkipGpgVerificationAllowed: result=\(result)") + return result + } + func clearCache() throws -> Promise { return Promise.resolved(withResult: ()) } 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 index 7203ba1f..28434ee3 100644 --- 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 @@ -181,6 +181,11 @@ namespace margelo::nitro::reactnativeappupdate { return __promise; }(); } + bool JHybridReactNativeAppUpdateSpec::isSkipGpgVerificationAllowed() { + static const auto method = javaClassStatic()->getMethod("isSkipGpgVerificationAllowed"); + auto __result = method(_javaPart); + return static_cast(__result); + } double JHybridReactNativeAppUpdateSpec::addDownloadListener(const std::function& callback) { static const auto method = javaClassStatic()->getMethod /* callback */)>("addDownloadListener_cxx"); auto __result = method(_javaPart, JFunc_void_DownloadEvent_cxx::fromCpp(callback)); diff --git a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JHybridReactNativeAppUpdateSpec.hpp b/native-modules/react-native-app-update/nitrogen/generated/android/c++/JHybridReactNativeAppUpdateSpec.hpp index e6f9159b..b419f0f3 100644 --- a/native-modules/react-native-app-update/nitrogen/generated/android/c++/JHybridReactNativeAppUpdateSpec.hpp +++ b/native-modules/react-native-app-update/nitrogen/generated/android/c++/JHybridReactNativeAppUpdateSpec.hpp @@ -62,6 +62,7 @@ namespace margelo::nitro::reactnativeappupdate { std::shared_ptr> clearCache() override; std::shared_ptr> testVerification() override; std::shared_ptr> testSkipVerification() override; + bool isSkipGpgVerificationAllowed() override; double addDownloadListener(const std::function& callback) override; void removeDownloadListener(double id) override; diff --git a/native-modules/react-native-app-update/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativeappupdate/HybridReactNativeAppUpdateSpec.kt b/native-modules/react-native-app-update/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativeappupdate/HybridReactNativeAppUpdateSpec.kt index bb0dae1b..178faabe 100644 --- a/native-modules/react-native-app-update/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativeappupdate/HybridReactNativeAppUpdateSpec.kt +++ b/native-modules/react-native-app-update/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativeappupdate/HybridReactNativeAppUpdateSpec.kt @@ -78,6 +78,10 @@ abstract class HybridReactNativeAppUpdateSpec: HybridObject() { @Keep abstract fun testSkipVerification(): Promise + @DoNotStrip + @Keep + abstract fun isSkipGpgVerificationAllowed(): Boolean + abstract fun addDownloadListener(callback: (event: DownloadEvent) -> Unit): Double @DoNotStrip diff --git a/native-modules/react-native-app-update/nitrogen/generated/ios/ReactNativeAppUpdate-Swift-Cxx-Bridge.hpp b/native-modules/react-native-app-update/nitrogen/generated/ios/ReactNativeAppUpdate-Swift-Cxx-Bridge.hpp index 9182ca96..623996a3 100644 --- a/native-modules/react-native-app-update/nitrogen/generated/ios/ReactNativeAppUpdate-Swift-Cxx-Bridge.hpp +++ b/native-modules/react-native-app-update/nitrogen/generated/ios/ReactNativeAppUpdate-Swift-Cxx-Bridge.hpp @@ -176,6 +176,15 @@ namespace margelo::nitro::reactnativeappupdate::bridge::swift { return Result>>::withError(error); } + // pragma MARK: Result + using Result_bool_ = Result; + inline Result_bool_ create_Result_bool_(bool value) noexcept { + return Result::withValue(std::move(value)); + } + inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) noexcept { + return Result::withError(error); + } + // pragma MARK: Result using Result_double_ = Result; inline Result_double_ create_Result_double_(double value) noexcept { diff --git a/native-modules/react-native-app-update/nitrogen/generated/ios/c++/HybridReactNativeAppUpdateSpecSwift.hpp b/native-modules/react-native-app-update/nitrogen/generated/ios/c++/HybridReactNativeAppUpdateSpecSwift.hpp index cb8c8e37..67f67f16 100644 --- a/native-modules/react-native-app-update/nitrogen/generated/ios/c++/HybridReactNativeAppUpdateSpecSwift.hpp +++ b/native-modules/react-native-app-update/nitrogen/generated/ios/c++/HybridReactNativeAppUpdateSpecSwift.hpp @@ -134,6 +134,14 @@ namespace margelo::nitro::reactnativeappupdate { auto __value = std::move(__result.value()); return __value; } + inline bool isSkipGpgVerificationAllowed() override { + auto __result = _swiftPart.isSkipGpgVerificationAllowed(); + if (__result.hasError()) [[unlikely]] { + std::rethrow_exception(__result.error()); + } + auto __value = std::move(__result.value()); + return __value; + } inline double addDownloadListener(const std::function& callback) override { auto __result = _swiftPart.addDownloadListener(callback); if (__result.hasError()) [[unlikely]] { diff --git a/native-modules/react-native-app-update/nitrogen/generated/ios/swift/HybridReactNativeAppUpdateSpec.swift b/native-modules/react-native-app-update/nitrogen/generated/ios/swift/HybridReactNativeAppUpdateSpec.swift index 935f51b0..6a8a1042 100644 --- a/native-modules/react-native-app-update/nitrogen/generated/ios/swift/HybridReactNativeAppUpdateSpec.swift +++ b/native-modules/react-native-app-update/nitrogen/generated/ios/swift/HybridReactNativeAppUpdateSpec.swift @@ -22,6 +22,7 @@ public protocol HybridReactNativeAppUpdateSpec_protocol: HybridObject { func clearCache() throws -> Promise func testVerification() throws -> Promise func testSkipVerification() throws -> Promise + func isSkipGpgVerificationAllowed() throws -> Bool func addDownloadListener(callback: @escaping (_ event: DownloadEvent) -> Void) throws -> Double func removeDownloadListener(id: Double) throws -> Void } diff --git a/native-modules/react-native-app-update/nitrogen/generated/ios/swift/HybridReactNativeAppUpdateSpec_cxx.swift b/native-modules/react-native-app-update/nitrogen/generated/ios/swift/HybridReactNativeAppUpdateSpec_cxx.swift index 7b6ea4f5..6e9d5266 100644 --- a/native-modules/react-native-app-update/nitrogen/generated/ios/swift/HybridReactNativeAppUpdateSpec_cxx.swift +++ b/native-modules/react-native-app-update/nitrogen/generated/ios/swift/HybridReactNativeAppUpdateSpec_cxx.swift @@ -269,6 +269,18 @@ open class HybridReactNativeAppUpdateSpec_cxx { } } + @inline(__always) + public final func isSkipGpgVerificationAllowed() -> bridge.Result_bool_ { + do { + let __result = try self.__implementation.isSkipGpgVerificationAllowed() + let __resultCpp = __result + return bridge.create_Result_bool_(__resultCpp) + } catch (let __error) { + let __exceptionPtr = __error.toCpp() + return bridge.create_Result_bool_(__exceptionPtr) + } + } + @inline(__always) public final func addDownloadListener(callback: bridge.Func_void_DownloadEvent) -> bridge.Result_double_ { do { diff --git a/native-modules/react-native-app-update/nitrogen/generated/shared/c++/HybridReactNativeAppUpdateSpec.cpp b/native-modules/react-native-app-update/nitrogen/generated/shared/c++/HybridReactNativeAppUpdateSpec.cpp index b277792b..f8c84f05 100644 --- a/native-modules/react-native-app-update/nitrogen/generated/shared/c++/HybridReactNativeAppUpdateSpec.cpp +++ b/native-modules/react-native-app-update/nitrogen/generated/shared/c++/HybridReactNativeAppUpdateSpec.cpp @@ -22,6 +22,7 @@ namespace margelo::nitro::reactnativeappupdate { prototype.registerHybridMethod("clearCache", &HybridReactNativeAppUpdateSpec::clearCache); prototype.registerHybridMethod("testVerification", &HybridReactNativeAppUpdateSpec::testVerification); prototype.registerHybridMethod("testSkipVerification", &HybridReactNativeAppUpdateSpec::testSkipVerification); + prototype.registerHybridMethod("isSkipGpgVerificationAllowed", &HybridReactNativeAppUpdateSpec::isSkipGpgVerificationAllowed); prototype.registerHybridMethod("addDownloadListener", &HybridReactNativeAppUpdateSpec::addDownloadListener); prototype.registerHybridMethod("removeDownloadListener", &HybridReactNativeAppUpdateSpec::removeDownloadListener); }); diff --git a/native-modules/react-native-app-update/nitrogen/generated/shared/c++/HybridReactNativeAppUpdateSpec.hpp b/native-modules/react-native-app-update/nitrogen/generated/shared/c++/HybridReactNativeAppUpdateSpec.hpp index ddf78cb1..5bacf096 100644 --- a/native-modules/react-native-app-update/nitrogen/generated/shared/c++/HybridReactNativeAppUpdateSpec.hpp +++ b/native-modules/react-native-app-update/nitrogen/generated/shared/c++/HybridReactNativeAppUpdateSpec.hpp @@ -65,6 +65,7 @@ namespace margelo::nitro::reactnativeappupdate { virtual std::shared_ptr> clearCache() = 0; virtual std::shared_ptr> testVerification() = 0; virtual std::shared_ptr> testSkipVerification() = 0; + virtual bool isSkipGpgVerificationAllowed() = 0; virtual double addDownloadListener(const std::function& callback) = 0; virtual void removeDownloadListener(double id) = 0; diff --git a/native-modules/react-native-app-update/src/ReactNativeAppUpdate.nitro.ts b/native-modules/react-native-app-update/src/ReactNativeAppUpdate.nitro.ts index 60ba2c20..26e1567d 100644 --- a/native-modules/react-native-app-update/src/ReactNativeAppUpdate.nitro.ts +++ b/native-modules/react-native-app-update/src/ReactNativeAppUpdate.nitro.ts @@ -28,6 +28,7 @@ export interface ReactNativeAppUpdate // Verification & testing testVerification(): Promise; testSkipVerification(): Promise; + isSkipGpgVerificationAllowed(): boolean; addDownloadListener(callback: (event: DownloadEvent) => void): number; removeDownloadListener(id: number): void; diff --git a/native-modules/react-native-bundle-update/android/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdate.kt b/native-modules/react-native-bundle-update/android/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdate.kt index 8e8f990a..263e6396 100644 --- a/native-modules/react-native-bundle-update/android/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdate.kt +++ b/native-modules/react-native-bundle-update/android/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdate.kt @@ -1228,6 +1228,12 @@ n2DMz6gqk326W6SFynYtvuiXo7wG4Cmn3SuIU8xfv9rJqunpZGYchMd7nZektmEJ } } + override fun isSkipGpgVerificationAllowed(): Boolean { + val result = BuildConfig.ALLOW_SKIP_GPG_VERIFICATION + OneKeyLog.info("BundleUpdate", "isSkipGpgVerificationAllowed: result=$result") + return result + } + override fun isBundleExists(appVersion: String, bundleVersion: String): Promise { return Promise.async { val context = getContext() diff --git a/native-modules/react-native-bundle-update/ios/ReactNativeBundleUpdate.swift b/native-modules/react-native-bundle-update/ios/ReactNativeBundleUpdate.swift index c660b122..c7f15118 100644 --- a/native-modules/react-native-bundle-update/ios/ReactNativeBundleUpdate.swift +++ b/native-modules/react-native-bundle-update/ios/ReactNativeBundleUpdate.swift @@ -1190,6 +1190,16 @@ class ReactNativeBundleUpdate: HybridReactNativeBundleUpdateSpec { } } + func isSkipGpgVerificationAllowed() throws -> Bool { + #if ALLOW_SKIP_GPG_VERIFICATION + let result = true + #else + let result = false + #endif + OneKeyLog.info("BundleUpdate", "isSkipGpgVerificationAllowed: result=\(result)") + return result + } + func isBundleExists(appVersion: String, bundleVersion: String) throws -> Promise { return Promise.async { let folderName = "\(appVersion)-\(bundleVersion)" diff --git a/native-modules/react-native-bundle-update/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.cpp b/native-modules/react-native-bundle-update/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.cpp index 73ffb537..e69e836f 100644 --- a/native-modules/react-native-bundle-update/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.cpp +++ b/native-modules/react-native-bundle-update/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.cpp @@ -333,6 +333,11 @@ namespace margelo::nitro::reactnativebundleupdate { return __promise; }(); } + bool JHybridReactNativeBundleUpdateSpec::isSkipGpgVerificationAllowed() { + static const auto method = javaClassStatic()->getMethod("isSkipGpgVerificationAllowed"); + auto __result = method(_javaPart); + return static_cast(__result); + } std::shared_ptr> JHybridReactNativeBundleUpdateSpec::isBundleExists(const std::string& appVersion, const std::string& bundleVersion) { static const auto method = javaClassStatic()->getMethod(jni::alias_ref /* appVersion */, jni::alias_ref /* bundleVersion */)>("isBundleExists"); auto __result = method(_javaPart, jni::make_jstring(appVersion), jni::make_jstring(bundleVersion)); diff --git a/native-modules/react-native-bundle-update/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.hpp b/native-modules/react-native-bundle-update/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.hpp index 0911d4c4..aa41d47a 100644 --- a/native-modules/react-native-bundle-update/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.hpp +++ b/native-modules/react-native-bundle-update/nitrogen/generated/android/c++/JHybridReactNativeBundleUpdateSpec.hpp @@ -70,6 +70,7 @@ namespace margelo::nitro::reactnativebundleupdate { std::shared_ptr> getNativeAppVersion() override; std::shared_ptr> testVerification() override; std::shared_ptr> testSkipVerification() override; + bool isSkipGpgVerificationAllowed() override; std::shared_ptr> isBundleExists(const std::string& appVersion, const std::string& bundleVersion) override; std::shared_ptr> verifyExtractedBundle(const std::string& appVersion, const std::string& bundleVersion) override; std::shared_ptr>> listLocalBundles() override; diff --git a/native-modules/react-native-bundle-update/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/HybridReactNativeBundleUpdateSpec.kt b/native-modules/react-native-bundle-update/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/HybridReactNativeBundleUpdateSpec.kt index 256ea507..1043779c 100644 --- a/native-modules/react-native-bundle-update/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/HybridReactNativeBundleUpdateSpec.kt +++ b/native-modules/react-native-bundle-update/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundleupdate/HybridReactNativeBundleUpdateSpec.kt @@ -110,6 +110,10 @@ abstract class HybridReactNativeBundleUpdateSpec: HybridObject() { @Keep abstract fun testSkipVerification(): Promise + @DoNotStrip + @Keep + abstract fun isSkipGpgVerificationAllowed(): Boolean + @DoNotStrip @Keep abstract fun isBundleExists(appVersion: String, bundleVersion: String): Promise diff --git a/native-modules/react-native-bundle-update/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.hpp b/native-modules/react-native-bundle-update/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.hpp index 98ffbd4a..763c2941 100644 --- a/native-modules/react-native-bundle-update/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.hpp +++ b/native-modules/react-native-bundle-update/nitrogen/generated/ios/ReactNativeBundleUpdate-Swift-Cxx-Bridge.hpp @@ -474,6 +474,15 @@ namespace margelo::nitro::reactnativebundleupdate::bridge::swift { return Result>>::withError(error); } + // pragma MARK: Result + using Result_bool_ = Result; + inline Result_bool_ create_Result_bool_(bool value) noexcept { + return Result::withValue(std::move(value)); + } + inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) noexcept { + return Result::withError(error); + } + // pragma MARK: Result>>> using Result_std__shared_ptr_Promise_std__vector_LocalBundleInfo____ = Result>>>; inline Result_std__shared_ptr_Promise_std__vector_LocalBundleInfo____ create_Result_std__shared_ptr_Promise_std__vector_LocalBundleInfo____(const std::shared_ptr>>& value) noexcept { diff --git a/native-modules/react-native-bundle-update/nitrogen/generated/ios/c++/HybridReactNativeBundleUpdateSpecSwift.hpp b/native-modules/react-native-bundle-update/nitrogen/generated/ios/c++/HybridReactNativeBundleUpdateSpecSwift.hpp index e0ee58c3..4cefe5ee 100644 --- a/native-modules/react-native-bundle-update/nitrogen/generated/ios/c++/HybridReactNativeBundleUpdateSpecSwift.hpp +++ b/native-modules/react-native-bundle-update/nitrogen/generated/ios/c++/HybridReactNativeBundleUpdateSpecSwift.hpp @@ -226,6 +226,14 @@ namespace margelo::nitro::reactnativebundleupdate { auto __value = std::move(__result.value()); return __value; } + inline bool isSkipGpgVerificationAllowed() override { + auto __result = _swiftPart.isSkipGpgVerificationAllowed(); + if (__result.hasError()) [[unlikely]] { + std::rethrow_exception(__result.error()); + } + auto __value = std::move(__result.value()); + return __value; + } inline std::shared_ptr> isBundleExists(const std::string& appVersion, const std::string& bundleVersion) override { auto __result = _swiftPart.isBundleExists(appVersion, bundleVersion); if (__result.hasError()) [[unlikely]] { diff --git a/native-modules/react-native-bundle-update/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec.swift b/native-modules/react-native-bundle-update/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec.swift index 115ef2b9..ba30758f 100644 --- a/native-modules/react-native-bundle-update/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec.swift +++ b/native-modules/react-native-bundle-update/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec.swift @@ -30,6 +30,7 @@ public protocol HybridReactNativeBundleUpdateSpec_protocol: HybridObject { func getNativeAppVersion() throws -> Promise func testVerification() throws -> Promise func testSkipVerification() throws -> Promise + func isSkipGpgVerificationAllowed() throws -> Bool func isBundleExists(appVersion: String, bundleVersion: String) throws -> Promise func verifyExtractedBundle(appVersion: String, bundleVersion: String) throws -> Promise func listLocalBundles() throws -> Promise<[LocalBundleInfo]> diff --git a/native-modules/react-native-bundle-update/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec_cxx.swift b/native-modules/react-native-bundle-update/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec_cxx.swift index fe5ba286..d719594b 100644 --- a/native-modules/react-native-bundle-update/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec_cxx.swift +++ b/native-modules/react-native-bundle-update/nitrogen/generated/ios/swift/HybridReactNativeBundleUpdateSpec_cxx.swift @@ -413,6 +413,18 @@ open class HybridReactNativeBundleUpdateSpec_cxx { } } + @inline(__always) + public final func isSkipGpgVerificationAllowed() -> bridge.Result_bool_ { + do { + let __result = try self.__implementation.isSkipGpgVerificationAllowed() + let __resultCpp = __result + return bridge.create_Result_bool_(__resultCpp) + } catch (let __error) { + let __exceptionPtr = __error.toCpp() + return bridge.create_Result_bool_(__exceptionPtr) + } + } + @inline(__always) public final func isBundleExists(appVersion: std.string, bundleVersion: std.string) -> bridge.Result_std__shared_ptr_Promise_bool___ { do { diff --git a/native-modules/react-native-bundle-update/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.cpp b/native-modules/react-native-bundle-update/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.cpp index 71fb04e0..e96d892c 100644 --- a/native-modules/react-native-bundle-update/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.cpp +++ b/native-modules/react-native-bundle-update/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.cpp @@ -30,6 +30,7 @@ namespace margelo::nitro::reactnativebundleupdate { prototype.registerHybridMethod("getNativeAppVersion", &HybridReactNativeBundleUpdateSpec::getNativeAppVersion); prototype.registerHybridMethod("testVerification", &HybridReactNativeBundleUpdateSpec::testVerification); prototype.registerHybridMethod("testSkipVerification", &HybridReactNativeBundleUpdateSpec::testSkipVerification); + prototype.registerHybridMethod("isSkipGpgVerificationAllowed", &HybridReactNativeBundleUpdateSpec::isSkipGpgVerificationAllowed); prototype.registerHybridMethod("isBundleExists", &HybridReactNativeBundleUpdateSpec::isBundleExists); prototype.registerHybridMethod("verifyExtractedBundle", &HybridReactNativeBundleUpdateSpec::verifyExtractedBundle); prototype.registerHybridMethod("listLocalBundles", &HybridReactNativeBundleUpdateSpec::listLocalBundles); diff --git a/native-modules/react-native-bundle-update/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.hpp b/native-modules/react-native-bundle-update/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.hpp index 20584afc..6de13ee5 100644 --- a/native-modules/react-native-bundle-update/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.hpp +++ b/native-modules/react-native-bundle-update/nitrogen/generated/shared/c++/HybridReactNativeBundleUpdateSpec.hpp @@ -102,6 +102,7 @@ namespace margelo::nitro::reactnativebundleupdate { virtual std::shared_ptr> getNativeAppVersion() = 0; virtual std::shared_ptr> testVerification() = 0; virtual std::shared_ptr> testSkipVerification() = 0; + virtual bool isSkipGpgVerificationAllowed() = 0; virtual std::shared_ptr> isBundleExists(const std::string& appVersion, const std::string& bundleVersion) = 0; virtual std::shared_ptr> verifyExtractedBundle(const std::string& appVersion, const std::string& bundleVersion) = 0; virtual std::shared_ptr>> listLocalBundles() = 0; diff --git a/native-modules/react-native-bundle-update/src/ReactNativeBundleUpdate.nitro.ts b/native-modules/react-native-bundle-update/src/ReactNativeBundleUpdate.nitro.ts index 7c2fd83c..c2fe8872 100644 --- a/native-modules/react-native-bundle-update/src/ReactNativeBundleUpdate.nitro.ts +++ b/native-modules/react-native-bundle-update/src/ReactNativeBundleUpdate.nitro.ts @@ -112,6 +112,7 @@ export interface ReactNativeBundleUpdate // Verification & testing testVerification(): Promise; testSkipVerification(): Promise; + isSkipGpgVerificationAllowed(): boolean; isBundleExists(appVersion: string, bundleVersion: string): Promise; verifyExtractedBundle( appVersion: string, From 0ac7d02f8ee81b1577e11382d69786f49d79a133 Mon Sep 17 00:00:00 2001 From: huhuanming Date: Fri, 6 Mar 2026 21:32:20 +0800 Subject: [PATCH 2/3] 1.1.29 => 1.1.30 --- native-modules/native-logger/package.json | 2 +- native-modules/react-native-app-update/package.json | 2 +- native-modules/react-native-background-thread/package.json | 2 +- native-modules/react-native-bundle-update/package.json | 2 +- .../react-native-check-biometric-auth-changed/package.json | 2 +- native-modules/react-native-cloud-kit-module/package.json | 2 +- native-modules/react-native-device-utils/package.json | 2 +- native-modules/react-native-get-random-values/package.json | 2 +- native-modules/react-native-keychain-module/package.json | 2 +- native-modules/react-native-lite-card/package.json | 2 +- native-modules/react-native-perf-memory/package.json | 2 +- native-modules/react-native-splash-screen/package.json | 2 +- native-views/react-native-auto-size-input/package.json | 2 +- native-views/react-native-skeleton/package.json | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/native-modules/native-logger/package.json b/native-modules/native-logger/package.json index 5851bb2e..99180a0b 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.29", + "version": "1.1.30", "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/package.json b/native-modules/react-native-app-update/package.json index 74e04623..0e770995 100644 --- a/native-modules/react-native-app-update/package.json +++ b/native-modules/react-native-app-update/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-app-update", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-app-update", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-background-thread/package.json b/native-modules/react-native-background-thread/package.json index d7f1f14a..b09a1c64 100644 --- a/native-modules/react-native-background-thread/package.json +++ b/native-modules/react-native-background-thread/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-background-thread", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-background-thread", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-bundle-update/package.json b/native-modules/react-native-bundle-update/package.json index fcbb9fad..a4ac3cca 100644 --- a/native-modules/react-native-bundle-update/package.json +++ b/native-modules/react-native-bundle-update/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-bundle-update", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-bundle-update", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-check-biometric-auth-changed/package.json b/native-modules/react-native-check-biometric-auth-changed/package.json index 5ea09959..e91a5781 100644 --- a/native-modules/react-native-check-biometric-auth-changed/package.json +++ b/native-modules/react-native-check-biometric-auth-changed/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-check-biometric-auth-changed", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-check-biometric-auth-changed", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-cloud-kit-module/package.json b/native-modules/react-native-cloud-kit-module/package.json index 97af71e6..ea1f093e 100644 --- a/native-modules/react-native-cloud-kit-module/package.json +++ b/native-modules/react-native-cloud-kit-module/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-cloud-kit-module", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-cloud-kit-module", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-device-utils/package.json b/native-modules/react-native-device-utils/package.json index 1f338e96..587e4d3f 100644 --- a/native-modules/react-native-device-utils/package.json +++ b/native-modules/react-native-device-utils/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-device-utils", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-device-utils", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-get-random-values/package.json b/native-modules/react-native-get-random-values/package.json index 278aab40..f6d9c5a5 100644 --- a/native-modules/react-native-get-random-values/package.json +++ b/native-modules/react-native-get-random-values/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-get-random-values", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-get-random-values", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-keychain-module/package.json b/native-modules/react-native-keychain-module/package.json index bc82d55d..5550a472 100644 --- a/native-modules/react-native-keychain-module/package.json +++ b/native-modules/react-native-keychain-module/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-keychain-module", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-keychain-module", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-lite-card/package.json b/native-modules/react-native-lite-card/package.json index 4aac4a4e..0ed6cc40 100644 --- a/native-modules/react-native-lite-card/package.json +++ b/native-modules/react-native-lite-card/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-lite-card", - "version": "1.1.29", + "version": "1.1.30", "description": "lite card", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-perf-memory/package.json b/native-modules/react-native-perf-memory/package.json index 9b5a9ac4..3de1e476 100644 --- a/native-modules/react-native-perf-memory/package.json +++ b/native-modules/react-native-perf-memory/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-perf-memory", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-perf-memory", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-splash-screen/package.json b/native-modules/react-native-splash-screen/package.json index d3872b4f..8a88d687 100644 --- a/native-modules/react-native-splash-screen/package.json +++ b/native-modules/react-native-splash-screen/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-splash-screen", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-splash-screen", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-views/react-native-auto-size-input/package.json b/native-views/react-native-auto-size-input/package.json index 45c96b05..6a2edf84 100644 --- a/native-views/react-native-auto-size-input/package.json +++ b/native-views/react-native-auto-size-input/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-auto-size-input", - "version": "1.1.29", + "version": "1.1.30", "description": "Auto-sizing text input with font scaling, prefix and suffix support", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-views/react-native-skeleton/package.json b/native-views/react-native-skeleton/package.json index 6043feef..89398386 100644 --- a/native-views/react-native-skeleton/package.json +++ b/native-views/react-native-skeleton/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-skeleton", - "version": "1.1.29", + "version": "1.1.30", "description": "react-native-skeleton", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", From f8e6f5e7dc6edce98b79175e917819768d91fd5f Mon Sep 17 00:00:00 2001 From: huhuanming Date: Fri, 6 Mar 2026 21:35:44 +0800 Subject: [PATCH 3/3] docs(changelog): add 1.1.30 note for skip-gpg capability API --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 882c25b3..d316b952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## [1.1.30] - 2026-03-06 + +### Features +- **bundle-update / app-update**: Add synchronous `isSkipGpgVerificationAllowed` API to expose whether build-time skip-GPG capability is enabled + ## [1.1.29] - 2026-03-06 ### Bug Fixes