Open iapicca opened 2 months ago
It looks like there are a few different issues at play here. Please correct me if I'm misunderstanding any of these.
We haven't thought much about web support, as the web itself is an update delivery mechanism. What would you want Shorebird to do that the browser's refresh button doesn't?
- [web] PWA apps do not update automatically flutter/flutter#105977 seems to suggest that the app itself is updated, but the home screen is not. I believe this would need to be fixed at the Flutter level—Shorebird would not be able to help with this.
@bryanoltman it could, but it's very unlikely to happen (not much going on in the PWA project) I understand that under-the-hood isn't necessarily code push, but as developer experience would feel very similar to shorebird for "native"
- Flutter web - Need documentation on how to conditionally display a "Refresh. New Version is available." prompt when updated code is deployed to production. flutter/flutter#104509 looks like a request for an "update is available" notification, not an update mechanism itself. Shorebird's API might be able to help with this, but I'm not sure that would be the right solution.
honestly I'm not sure why a "notification" for an "new version available" could not just trigger an update, I agree with you that the issue points at a workaround rather than a solution, nonetheless it stress the importance of this feature for developers
We haven't thought much about web support, as the web itself is an update delivery mechanism. What would you want Shorebird to do that the browser's refresh button doesn't?
that's the absurdity of the problem: a refresh button won't refresh a PWA it's easily reproducible:
Would this help? https://stackoverflow.com/questions/70968547/pwa-how-to-refresh-content-every-time-the-app-is-opened
I don't think it really apply to flutter's case and if it did, refreshing every time would be a pretty bad ux as pointed out in the comments
I understand this is a flutter issue, the reason why I'm posting this here is because what shorebird does for native would 100% fix the problem
on top of the arguments made above, please consider the use case in which a developer would have to split codebase shorebird for native and vanilla for web while building the same app (I already had a couple of native + web app)
not asking to rush it into the top of the priorities, just keep it in mind for future discussions
@iapicca
Is this issue to update the name and icon when a PWA is installed on a mobile device ? Or is it to update the actual code.
If it's the actual code, I believe that's already supported by the PWA technology. You'll see the updated version on next opening (and it should be the same for icon and name actually, so I'm not sure now).
@cedvdb
Is this issue to update the name and icon when a PWA is installed on a mobile device ? Or is it to update the actual code.
the latter
If it's the actual code, I believe that's already supported by the PWA technology.
it should, but flutter doesn't support it
You'll see the updated version on next opening
in my experience it won't to reproduce simply (added to the initial post)
see reply
that's the absurdity of the problem: a refresh button won't refresh a PWA it's easily reproducible:
- create and deploy a flutter web app
- install as PWA
change and re-deploy the app
- the new version of the web app is available in browser
- the PWA is stuck on the old version even refreshing / open-close the PWA
Description
at the time of writing updating a flutter PWA is clumsy if possible at all, it would be great if shorebird would support flutter web allowing code push to flutters PWA
Requirements
current behavior
ideal behavior
Additional Context