Merge pull request #368 from jxxghp/cursor/fix-ios-detection-inconsistency-in-pwa-2971

Fix iOS detection inconsistency in PWA
This commit is contained in:
jxxghp
2025-07-07 22:48:57 +08:00
committed by GitHub

View File

@@ -86,7 +86,7 @@ export function usePWAInstall() {
const isPWASupported = computed(() => {
const hasServiceWorker = 'serviceWorker' in navigator
const supportsInstallPromptEvent = 'onbeforeinstallprompt' in window
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent)
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !(window as any).MSStream
return hasServiceWorker && (supportsInstallPromptEvent || isIOS)
})