I\'m loading a javascript which is in my App, the script will try to find a solution, which can takes some time. I don\'t want to wait more than 5 seconds for that solution, in
Another UIWebView delegate func is missing in your code. You may want to add timer2.invalidate()
in
func webView(_ webView: UIWebView,
didFailLoadWithError error: NSError)
Ok guys, I created a Worker in my Javascript code, so I can handle it like new threads but not in iOS (which was impossible to do using UIWebView). The solution is here: iOS Javascript Workers High CPU after terminate()