-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is the install function supposed to do anything? #748
Comments
You should check if |
I checked the value of I tried to set it to Here's a snippet of my code:
How do I use the $pwa.install method? |
That flag must be set by the browser on before install prompt event listener: the sw must installed and activated and the browser must support the feature. You cannot change browser behavior. You can check the logic here: https://github.com/vite-pwa/nuxt/blob/main/src/runtime/plugins/pwa.client.ts#L86 |
So if I understand correctly, since I cannot change the browser behaviour, it means it either works or it doesn't. In my case, since it doesn't work, there's nothing I can do? |
bump |
If the browser doesn't have that feature we cannot do anything, check: https://caniuse.com/?search=beforeinstallprompt |
I'm using this plugin with nuxt. Everything works as expected.
However, I wanted to to create a button for the user to add the PWA to the homescreen so I stumbled upon the $pwa.install method.
I'm calling it on button click but it does nothing.
What is it supposed to do or why isn't it working?
I have client: { installPrompt: true } in pwa object in nuxt.config.
The text was updated successfully, but these errors were encountered: