Fix PWA install detection on iOS with additional check for MSStream

Co-authored-by: jxxghp <jxxghp@163.com>
This commit is contained in:
Cursor Agent
2025-07-07 14:48:00 +00:00
parent c787a3c786
commit a80877bab7

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