Problem: my PWA is already installed on many clients, Android and iOS, and I want to update the launch icon and splash screen.
Android: according to Google documentation:
When the PWA is launched, Chrome determines the last time the local manifest was checked for changes. If the manifest hasn't been checked in the last 24 hours, Chrome will schedule a network request for the manifest, then compare it against the local copy.
If select properties in the manifest have changed (see list below), Chrome queues the new manifest, and after all windows of the PWA have been closed, the device is plugged in, and connected to WiFi, Chrome requests an updated WebAPK from the server. Once updated, all fields from the new manifest are used.
Which properties will trigger an update? background_color, display, orientation, scope, shortcuts, start_url, theme_color, web_share_target
In my tests, when I update one of these fields in the manifest (I am updating background_color
for Chrome to pick up the change and the images specified in icons\src
with the new icon), it will indeed be picked up after some time (I can see it by navigating to chrome://webapks
) but the launch icon will NOT be updated. I have tried changing the icon name in addition to the icon content but that does not help.
Notes:
- if I follow the instructions in Testing manifest updates then the icon will indeed be updated after some time, but obviously, I can't ask this to my users...
- My PWA is listed in the installed apps in Android's settings
iOS: here the icon is specified in an HTML tag apple-touch-icon
and I could not find anything except this very old answer on SO:
In newer iterations of iOS, the Apple Touch Icon that is displayed on the home screen is cached just like any other piece of content from the website. By simply changing the name of the image, it will force the home screen shortcut to refresh the icon the next time the shortcut is launched.
<link rel="apple-touch-icon" href=".\icon.ico">
Again this is not what I am seeing, the icon will not change even if I modify the name of the referenced image.
What am I missing???