From 0296bff3c9ba4e7048b90b9262b732422e5dcd39 Mon Sep 17 00:00:00 2001 From: fchinembiri Date: Wed, 29 Jul 2026 21:53:33 +0200 Subject: [PATCH] fix(pwa): add iOS meta tags, PNG icon manifest declarations, and register Service Worker --- apps/nextgen/client/index.html | 2 ++ apps/nextgen/client/public/manifest.webmanifest | 8 ++++---- apps/nextgen/client/src/main.tsx | 4 ++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/nextgen/client/index.html b/apps/nextgen/client/index.html index 5fb3ef2..d9b29f3 100644 --- a/apps/nextgen/client/index.html +++ b/apps/nextgen/client/index.html @@ -8,6 +8,8 @@ + + diff --git a/apps/nextgen/client/public/manifest.webmanifest b/apps/nextgen/client/public/manifest.webmanifest index e7bc362..c8d654b 100644 --- a/apps/nextgen/client/public/manifest.webmanifest +++ b/apps/nextgen/client/public/manifest.webmanifest @@ -9,15 +9,15 @@ "orientation": "portrait-primary", "icons": [ { - "src": "/nextgen-logo.jpeg", + "src": "/pwa-192x192.png", "sizes": "192x192", - "type": "image/jpeg", + "type": "image/png", "purpose": "any maskable" }, { - "src": "/nextgen-logo.jpeg", + "src": "/pwa-512x512.png", "sizes": "512x512", - "type": "image/jpeg", + "type": "image/png", "purpose": "any maskable" } ] diff --git a/apps/nextgen/client/src/main.tsx b/apps/nextgen/client/src/main.tsx index cfcfadd..d8c235a 100644 --- a/apps/nextgen/client/src/main.tsx +++ b/apps/nextgen/client/src/main.tsx @@ -7,6 +7,10 @@ import { syncEngine } from './lib/sync'; import { useOfflineQueue } from './lib/offlineQueue'; import { ToastProvider } from './components/Toast'; import { ConfirmationProvider } from './hooks/useConfirmation'; +import { registerSW } from 'virtual:pwa-register'; + +// Register PWA service worker for offline & installability +registerSW({ immediate: true }); // Initialize Offline Capabilities initDB().then(() => {