WKWebview 运行时Crash,在代理方法中添加如下可解决
- (void)webView:(WKWebView*)webView decidePolicyForNavigationAction:(WKNavigationAction*)navigationAction decisionHandler:(void(^)(WKNavigationActionPolicy))decisionHandler {
WebViewJavascriptBridgeBase *base = [[WebViewJavascriptBridgeBase alloc] init];
if([base isWebViewJavascriptBridgeURL:navigationAction.request.URL]) {
return;
}// Add this IF statement in my project, don`t need modify WebViewJavascriptBridge`s source code.
decisionHandler(WKNavigationActionPolicyAllow);
}