WKWebView javascript execution when app is in background

In my app I have a WKWebView that executes some long running tasks (via javascript), but it seems that when the app is backgrounded the javascript being executed in the WKWebView just pauses/freezes. Bringing the app to foreground resumes the javascript execution.


How can I keep javascript code running even when my app is backgrounded?

I am interested too.

If anyone have a response ...

This is by design, for the same reasons *any* app that is suspended no longer gets to execute code.

This might've been relaxed a little bit in iOS releases since you posed the question, but only for a few seconds.
WKWebView javascript execution when app is in background
 
 
Q