iPhone UIWebView Bug

2019-08-19 06:51发布

I am getting this error message in the console, while i am trying to load a html page in UIWebView ?

"void SendDelegateMessage(NSInvocation*): delegate failed to return after waiting 10 seconds. main run loop mode: UITrackingRunLoopMode If you were not using the touch screen for this entire interval (which can prolong this wait), please file a bug."

Any reason for it ?

Thanks

2条回答
Bombasti
2楼-- · 2019-08-19 07:20

If you only see this error when you put a breakpoint in webViewDidFinishLoad: I don't think that this is a problem.

On the other hand, if you see it when your code is running normally then it is a problem. You may need to break out the parsing of the XML file into a separate thread or, at least, decouple it from the web view.

查看更多
老娘就宠你
3楼-- · 2019-08-19 07:23

I don't know if this is necessarily your problem, but I have received the same message when a piece of Javascript takes too long to execute. Do you know if the webpage you are loading is doing any heavy javascript on load?

In my case I was testing if you could use prompt() in a UIWebView - which worked, but gave the error you mentioned if I took more than 10 seconds to dismiss the popup.

查看更多
登录 后发表回答