What actions run the webViewWebContentProcessDidTerminate function

I made an iOS application with Xcode and Swift using only WebView. Sometimes the website displayed by this WebView crashes. In this case, I want to reload WebView.

For this, I read that a new trigger has appeared in iOS 9, which is called when:

The web content browsing process ends.

Source: iOS Developer Library

So I add this function to my file ViewController:

func webViewWebContentProcessDidTerminate(webView: WKWebView){
    print("Reload");
    self.webView!.reload();
}

But when my site crashes, don't add anything, so I wonder: in which case is webViewWebContentProcessDidTerminate called?

+4
source share
1 answer

kristfal :

, webViewWebContentProcessDidTerminate. wkwebview. -, ( ).

, - webViewWebContentProcessDidTerminate. webview applicationDidBecomeActive, (, , 1/10 ), , .

: https://github.com/Telerik-Verified-Plugins/WKWebView/issues/248#issuecomment-235241805

+2

Source: https://habr.com/ru/post/1651792/


All Articles