Search code examples
iphoneiosuiwebview

UIWebview gets stuck with the following message in console


UIWebview gets stuck with the following message in console.

void SendDelegateMessage(NSInvocation*): delegate (webView:didFinishLoadForFrame:)   
failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode

anyone knows what this is??


Solution

  • Are you using any Javascript on the page you are loading?

    Specifically, are you using the method

    - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script
    

    As the docs state the following

    JavaScript execution time is limited to 10 seconds for each top-level entry point. If your script executes for more than 10 seconds, the web view stops executing the script

    And this seems to tie in with the error message you are seeing in the console