iOS Webview - game freezes after ap switch

I am working on a Phaser3 game that is to be played in a webview inside a native iOS / Android App.

When I play the game in iOS webview and I switch the app if I return in the next few seconds the game continues.
But if I leave it in the background for anything more than 60 seconds when I return the game is completely frozen.

My theory is that the game does not really stop while minimized. I believe that any timer,setTimeout, setInterval are somehow running in the background and when I open it again it all clogs severely. But this is just a theory :slight_smile:

Anyway - I tried implementing game pause on blur event (both the DOM and Phaser implementations). It works perfectly on Android but not ot iOS.
I also tried tracking the visibilityChange event with no success.

Any ideas?

This doesn’t happen with my iOS app, but I am using wkWebView. It’s performance is so much better than webview, which hardly ran my app. Have you tried that?

Thanks!
I do not have control over the native app - the game is to be played as part of a Viber campaign. The game is hosted on a webserver and then the address is opened inside the whatever implementation Viber uses (wkWebView or webview).
The game performance is great. The only trouble is that when the user switches away from the Viber app and them comes back it has frozen.