Force the game to periodically update in the background.
Ive just done a quick test with this as i am looking for a solution. I added a new item to a list (showing time) and I update it every:
wallclocktime - lastTime >= 1 second
I then export as HTML and install to homescreen on iOS and initially it works.
However, if I leave it a while (2 minutes) and re-open it, it like catches up with its self and adds the N number of items (correct amount) to the list but all at the time of opening, therefore timestamps are all the same.
So "something" is running in background and queuing all the actions up but then only executing them on re-opening?
Any ideas?
Apps get throttled over time by the OS. Same happens with browser tab when you have them in the background. After a while, updates will get slower and slower. There is nothing you can do to fix this as far as I'm aware. There might be platform specific systems but I don't know if they would work.