Skip to content
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

Vue PWA doesn't update on iOS #2945

Open
mikejamesli opened this issue Nov 13, 2018 · 2 comments
Open

Vue PWA doesn't update on iOS #2945

mikejamesli opened this issue Nov 13, 2018 · 2 comments

Comments

@mikejamesli
Copy link

@mikejamesli mikejamesli commented Nov 13, 2018

Version

3.1.0

Reproduction link

https://github.com/mikeli11/vuepwaplugin

Node and OS info

Node 8.11.3 / Windows 10

Steps to reproduce

The issue is simple, I create a new project using vue-cli-3.1.0 and select the pwa plugin. I publish this app to netlify and add it to my homescreen on iOS12. I open the app and everything looks fine, I make an update and publish the site again. No matter how many times i open the app on iOS it is always showing the old version. This could be a Vue pwa plugin specific issue or with safari.

See it in action:
https://youtu.be/b197y8sMaKM

What is expected?

PWA is updated with the latest content.

What is actually happening?

PWA is still the older version of the app.

@sodatea

This comment has been minimized.

Copy link
Member

@sodatea sodatea commented Nov 26, 2018

I'm also puzzled by this behavior.
Seems a Safari bug.

GoogleChrome/workbox#1744

@mikejamesli

This comment has been minimized.

Copy link
Author

@mikejamesli mikejamesli commented Dec 7, 2018

@sodatea I fixed the issue by adding the skipwaiting:true option in the vue.config.js. After restarting the app on iOS, the latest version is now loaded.

workboxOptions: { skipWaiting: true }

Let me know if this helps you with your workbox issue. I don't know if this is the expected behaviour in Safari since this setting force installs the latest SW as soon as it's downloaded (which is not recommended). As you know already, chrome doesn't need this for the expected behaviour.

Reference:
https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.