Just to help others.
I have had issues with PWAs for weeks. My acid test was if it would run offline (when no offsite resources are used). If it doesn't then its not installed correctly.
I am finally 100% confident to actually write my application. Some of the issues I found. Not all solutions may be required, the path I took, went through them.
- Supposedly, the App caches the manifest for a day.
- Supposedly, the browsers cache the manifest for up to 3 days.
- I was refreshing the browser, but was unaware of the caching by the PWA.
Consequently, I was running with a manifest a day old, thinking that my current changes had worked. Of course, the next day it would all fail again. - The manifest file produced by TMS is not suitable when the app is not in the website's root directory. This produces random, unrepeatable successes.
- I had to add a scope field because I wasn't running from the websites root directory.
- I had to add an id field, which contrary to many docs, isn't a URL, some browsers don't like slashes and/or dots. It is a unique string such as GUID.
- I had to review/change all paths in the manifest because it was not installed from the root directory.
- On iPhone only Safari works and doesn't show the install option, it just does it when you select Save to Home Screen.
- Apple has not allowed PWA to work in all countries.
- I had to add a favicon.ico to my websites root directory - I am still bamboozled why the PWA (or the browser) accesses it. To clarify, I am not using this icon, nor have I referenced it anywhere.
Now I have tested it on 9 different Android phones and 4 different iPhones with Safari, Brave, Firefox and Chrome and on Windows 10, in Australia and New Zealand.
Final helpful hint, I was testing how exceptions worked and were handled.
You should install a global error handler right away as uncaught exceptions freeze the PWA, and the user cant tell why.
Kudos to the team, as everyday I appreciate the amount of work that must have gone in to create TMS Webcore.