Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion native-modules/native-logger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-native-logger",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-native-logger",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-aes-crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-aes-crypto",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-aes-crypto",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1143,17 +1143,26 @@ class ReactNativeAppUpdate : HybridReactNativeAppUpdateSpec() {
OneKeyLog.info("AppUpdate", "verifyAPK: package name matches installed app")
}

// Verify APK signing certificate matches the installed app
// Verify APK signing certificate matches the installed app.
//
// This cross-check is defense-in-depth ONLY: by the time verifyAPK
// runs, verifyASC has already proven the bytes on disk are the
// authentic OneKey APK via GPG + SHA-256, and Android's own
// PackageInstaller re-verifies the signing certificate at install
// time. So a genuine MISMATCH is still hard-failed, but when the
// platform can't read the archive's signers (null) we just log it
// and silently skip — on some OEM ROMs (Huawei/EMUI Android 9–10)
// and for large APKs getPackageArchiveInfo returns null signers
// even for a perfectly valid APK, and blocking on that bricks the
// update for those users.
OneKeyLog.info("AppUpdate", "verifyAPK: verifying APK signing certificate (API level=${Build.VERSION.SDK_INT})...")
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
val apkInfo = pm.getPackageArchiveInfo(file.absolutePath, PackageManager.GET_SIGNING_CERTIFICATES)
val installedInfo = pm.getPackageInfo(context.packageName, PackageManager.GET_SIGNING_CERTIFICATES)
val apkSigners = apkInfo?.signingInfo?.apkContentsSigners
val installedSigners = installedInfo?.signingInfo?.apkContentsSigners
if (apkSigners == null || installedSigners == null) {
OneKeyLog.error("AppUpdate", "verifyAPK: signing info unavailable (apkSigners=${apkSigners != null}, installedSigners=${installedSigners != null})")
if (!debugBuild) throw Exception("SIGNATURE_UNAVAILABLE")
OneKeyLog.warn("AppUpdate", "verifyAPK: DEBUG build — ignoring unavailable signatures")
OneKeyLog.info("AppUpdate", "verifyAPK: signing info unavailable (apkSigners=${apkSigners != null}, installedSigners=${installedSigners != null}), skipping signing certificate check")
} else {
OneKeyLog.info("AppUpdate", "verifyAPK: APK signers count=${apkSigners.size}, installed signers count=${installedSigners.size}")
if (apkSigners.toSet() != installedSigners.toSet()) {
Expand All @@ -1172,9 +1181,7 @@ class ReactNativeAppUpdate : HybridReactNativeAppUpdateSpec() {
val apkSignatures = apkInfo?.signatures
val installedSignatures = installedInfo?.signatures
if (apkSignatures == null || installedSignatures == null) {
OneKeyLog.error("AppUpdate", "verifyAPK: legacy signatures unavailable")
if (!debugBuild) throw Exception("SIGNATURE_UNAVAILABLE")
OneKeyLog.warn("AppUpdate", "verifyAPK: DEBUG build — ignoring unavailable signatures")
OneKeyLog.info("AppUpdate", "verifyAPK: legacy signatures unavailable (apkSignatures=${apkSignatures != null}, installedSignatures=${installedSignatures != null}), skipping signing certificate check")
} else {
OneKeyLog.info("AppUpdate", "verifyAPK: APK signatures count=${apkSignatures.size}, installed signatures count=${installedSignatures.size}")
if (apkSignatures.toSet() != installedSignatures.toSet()) {
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-app-update/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-app-update",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-app-update",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-async-storage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-async-storage",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-async-storage",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-background-thread/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-background-thread",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-background-thread",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-bundle-crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-bundle-crypto",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-bundle-crypto",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-bundle-update/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-bundle-update",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-bundle-update",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-check-biometric-auth-changed",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-check-biometric-auth-changed",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-cloud-fs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-cloud-fs",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-cloud-fs TurboModule for OneKey",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-cloud-kit-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-cloud-kit-module",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-cloud-kit-module",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-device-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-device-utils",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-device-utils",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-dns-lookup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-dns-lookup",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-dns-lookup",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-get-random-values/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-get-random-values",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-get-random-values",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-keychain-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-keychain-module",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-keychain-module",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-lite-card/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-lite-card",
"version": "3.0.67",
"version": "3.0.68",
"description": "lite card",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-network-info/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-network-info",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-network-info",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-pbkdf2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-pbkdf2",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-pbkdf2",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-perf-memory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-perf-memory",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-perf-memory",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-perf-stats/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-perf-stats",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-perf-stats",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-ping/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-ping",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-ping TurboModule for OneKey",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-range-downloader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-range-downloader",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-range-downloader",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-splash-screen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-splash-screen",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-splash-screen",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-split-bundle-loader",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-split-bundle-loader",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-tcp-socket/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-tcp-socket",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-tcp-socket",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-zip-archive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-zip-archive",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-zip-archive Nitro HybridObject for OneKey",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-views/react-native-auto-size-input/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-auto-size-input",
"version": "3.0.67",
"version": "3.0.68",
"description": "Auto-sizing text input with font scaling, prefix and suffix support",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-views/react-native-chart-webview/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-chart-webview",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-chart-webview",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-views/react-native-pager-view/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-pager-view",
"version": "3.0.67",
"version": "3.0.68",
"description": "React Native wrapper for Android and iOS ViewPager",
"source": "./src/index.tsx",
"main": "./lib/module/index.js",
Expand Down
2 changes: 1 addition & 1 deletion native-views/react-native-perp-depth-bar/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-perp-depth-bar",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-perp-depth-bar",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-views/react-native-scroll-guard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-scroll-guard",
"version": "3.0.67",
"version": "3.0.68",
"description": "A native view wrapper that prevents parent scrollable containers (PagerView/ViewPager2) from intercepting child scroll gestures",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-views/react-native-segment-slider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-segment-slider",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-segment-slider",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-views/react-native-skeleton/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-skeleton",
"version": "3.0.67",
"version": "3.0.68",
"description": "react-native-skeleton",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ class RCTTabViewManager(context: ReactApplicationContext) :
}

// iOS-only props (no-ops on Android)
// selectedIcons feeds UITabBarItem.selectedImage on iOS; Android keeps
// swapping the icon in JS via the focusedKey-driven `icons` array.
override fun setSelectedIcons(view: ReactBottomNavigationView?, value: ReadableArray?) {}
override fun setTranslucent(view: ReactBottomNavigationView?, value: Boolean) {}
override fun setSidebarAdaptable(view: ReactBottomNavigationView?, value: Boolean) {}
override fun setScrollEdgeAppearance(view: ReactBottomNavigationView?, value: String?) {}
Expand Down
13 changes: 13 additions & 0 deletions native-views/react-native-tab-view/ios/RCTTabViewComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,19 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
[_containerView setValue:iconsArray forKey:@"icons"];
}

if (oldViewProps.selectedIcons != newViewProps.selectedIcons) {
auto selectedIconsArray = [[NSMutableArray alloc] init];
for (auto &source: newViewProps.selectedIcons) {
NSMutableDictionary *iconDict = [NSMutableDictionary dictionary];
iconDict[@"uri"] = [NSString stringWithUTF8String:source.uri.c_str()];
iconDict[@"width"] = @(source.size.width);
iconDict[@"height"] = @(source.size.height);
iconDict[@"scale"] = @(source.scale);
[selectedIconsArray addObject:iconDict];
}
[_containerView setValue:selectedIconsArray forKey:@"selectedIcons"];
}

if (oldViewProps.sidebarAdaptable != newViewProps.sidebarAdaptable) {
[_containerView setValue:@(newViewProps.sidebarAdaptable) forKey:@"sidebarAdaptable"];
}
Expand Down
Loading