You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Tutorial/Dexie-Cloud.md
+73Lines changed: 73 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -340,3 +340,76 @@ This file is needed when you use the CLI (`npx dexie-cloud`) to whitelist, expor
340
340
### Why should `dexie-cloud.json` and `dexie-cloud.key` be .gitignored?
341
341
342
342
Keys shall never be committed to git (`dexie-cloud.key`). `dexie-cloud.json` does not contain any sensitive data but is still not tied to your code base - some other person might want to run the app on another database.
343
+
344
+
### How can I make my webapp an installable app (PWA) on desktop and mobile?
345
+
346
+
To make your webapp a Progressive Web App (PWA), you only need a few small pieces:
347
+
348
+
- Create a web app manifest (`manifest.webmanifest`) with name, icons, start_url and display (standalone).
349
+
- Add a service worker that caches your app shell and (optionally) API responses. Keep the service worker small and focused on offline/app-shell behavior.
350
+
- Register the service worker from your client code (e.g. `navigator.serviceWorker.register('/sw.js')`).
351
+
- Ensure your site is served over HTTPS (localhost is allowed for development).
352
+
353
+
If you use Vite, there are community plugins that automate manifest generation and service-worker integration (for example `vite-plugin-pwa`). These plugins can inject the manifest, generate precache lists and wire service-worker registration for you.
354
+
355
+
Quick checklist:
356
+
357
+
1. Add `manifest.webmanifest` to your public folder and link it from `<head>`.
358
+
2. Add a minimal `sw.js` (or use a plugin to generate Workbox-powered service worker).
359
+
3. Register the service worker in your app entry file.
360
+
4. Test using Chrome/Edge Lighthouse or `web.dev/measure` and verify installability on mobile.
361
+
362
+
### How can I bundle my app as a native app for iOS and Google Play?
363
+
364
+
To package your webapp as native apps you have a few solid options. The most common are:
365
+
366
+
- Capacitor (Ionic) — modern, actively maintained native runtime that wraps your web app and provides native plugins. Good for both iOS and Android.
367
+
- Electron — popular for packaging web apps as native desktop apps (macOS, Windows, Linux). Works well with PWAs and frameworks like Vite; pair with builders like `electron-builder` or `electron-forge` for installers.
368
+
- PWABuilder / TWA (Trusted Web Activity) — generate Android APKs/AABs from a PWA; TWA is ideal if your app is already a high-quality PWA.
369
+
- Cordova / PhoneGap — older tooling still in use for legacy projects but generally superseded by Capacitor.
370
+
371
+
Recommended quick actions:
372
+
373
+
1. Make sure your app is a solid PWA first (see previous section). PWAs are the best starting point for native packaging.
374
+
2. Choose a tool:
375
+
376
+
- Capacitor: follow its setup docs to add platforms, copy the web build into the native projects and run builds with Xcode (iOS) and Android Studio (Android).
377
+
378
+
- Electron: follow its docs to wrap your web build in a desktop runtime — build the web UI, create a small main process that loads the built files, and use builders like `electron-builder` or `electron-forge` to produce installers; remember to configure signing/notarization and auto-updates.
379
+
380
+
- PWABuilder / TWA: use PWABuilder to generate an Android TWA wrapper or follow the TWA docs to create an AAB that links to your hosted PWA.
381
+
382
+
3. Configure platform-specific settings: app id/package name, icons and splash screens, permissions, and any native plugins you need.
383
+
4. Test on real devices and use platform tooling (Xcode for iOS, Android Studio / bundletool for Android) to create release builds and sign them.
384
+
5. Follow the store submission guides to publish on App Store and Google Play (you'll need developer accounts, app listing assets, privacy policy, etc.).
- Request private support from the dexie team: [privsupport@dexie.org](https://dexie.org/contact#private-support-issues)
414
+
415
+
We prefer getting questions on stackoverflow and Github because it they will be publicly searchable for other users and creates a helps learning AI engines.
0 commit comments