fix(pwa): add manifest link in app.html so Android Chrome shows install prompt

The plugin generated /manifest.webmanifest and the SW precached it, but
nothing in app.html linked to it. Chrome's install criteria require a
discoverable `<link rel="manifest">` in the document head — without it,
the address-bar install affordance never appears and the
beforeinstallprompt event never fires.

iOS Safari's "Add to Home Screen" already works via apple-touch-icon
alone, but with the manifest linked it now uses the manifest's name +
short_name + theme color as well.

All other install criteria were already in place: HTTPS, service worker
with skipWaiting+clientsClaim, 192/512 + maskable icons, iOS meta tags.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 15:22:30 +02:00
parent ae4fd45b99
commit abfb64b177

View File

@@ -5,6 +5,9 @@
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#0f172a" />
<!-- PWA manifest link. Required for Android Chrome install prompt;
iOS Safari "Add to Home Screen" uses it for name/icon fallback. -->
<link rel="manifest" href="/manifest.webmanifest" />
<!-- iOS PWA install hints (Fase 6.2). -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />