From 7a60a2e601314d50d9f73732415b6d59fe496985 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Wed, 1 Jul 2026 19:34:52 +0300 Subject: [PATCH] fix: restore iOS QR code scanning Skip Android-only scanner module setup on iOS Keep Android QR scanner module preparation unchanged --- packages/ui/src/apps/mobileQrScan.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/apps/mobileQrScan.ts b/packages/ui/src/apps/mobileQrScan.ts index 7fd77b1a..15aa52bb 100644 --- a/packages/ui/src/apps/mobileQrScan.ts +++ b/packages/ui/src/apps/mobileQrScan.ts @@ -51,7 +51,12 @@ const MODULE_INSTALL_TIMEOUT_MS = 90_000; // where these methods don't exist (iOS) or when it's already available. Resolves once the module // is usable; rejects if the install is canceled, fails, or times out. const ensureScannerModule = async (plugin: BarcodeScannerPlugin): Promise => { - if (!plugin.isGoogleBarcodeScannerModuleAvailable || !plugin.installGoogleBarcodeScannerModule) { + const capacitor = (window as typeof window & { Capacitor?: { getPlatform?: () => string } }).Capacitor; + if ( + capacitor?.getPlatform?.() !== 'android' || + !plugin.isGoogleBarcodeScannerModuleAvailable || + !plugin.installGoogleBarcodeScannerModule + ) { return; } const status = await plugin.isGoogleBarcodeScannerModuleAvailable().catch(() => undefined);