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);