vite-pwa / nuxt

Zero-config PWA Plugin for Nuxt 3
https://vite-pwa-org.netlify.app/frameworks/nuxt
MIT License
451 stars 22 forks source link

Publishable APK #33

Open shaheer-haider opened 1 year ago

shaheer-haider commented 1 year ago

I have a website and I want most part of it in a mobile App. Is it possible to create its PWA and publishable APK of the Nuxt 3 project using vite-pwa? And is it possible to detect if it is on the web or running as App on Android?

userquin commented 1 year ago

@shaheer-haider

Is it possible to create its PWA and publishable APK of the Nuxt 3 project using vite-pwa?

no, vite-plugin-pwa or any pwa integration include it, check PWA Builder, keep in mind you will need to pay to publish it: https://docs.pwabuilder.com/#/builder/quick-start?id=prerequisites

And is it possible to detect if it is on the web or running as App on Android?

If you're using @vite-pwa/nuxt you can use $pwa.isInstalled, it will be true if PWA app is installed, it is based on this https://thomashunter.name/posts/2021-12-11-detecting-if-pwa-twa-is-installed: check the logic here https://github.com/vite-pwa/nuxt/blob/main/templates/pwa.client.ts#L18