WKWebView 学习中的坑
2018-04-11 本文已影响54人
LYDeveloper
1、 Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2018-04-11 10:40:56.385880+0800 XXX[1997:73994] 当主服务器接收到服务器重定向时调用
2018-04-11 10:40:57.924879+0800 XXX[1997:73994] 决定是否在其响应已知后允许或取消导航。
2018-04-11 10:40:57.931030+0800 XXX[1997:73994] Frame load interrupted
2018-04-11 10:59:14.214299+0800 XXX[1997:73994] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
/*! @abstract Decides whether to allow or cancel a navigation after its
response is known.
@param webView The web view invoking the delegate method.
@param navigationResponse Descriptive information about the navigation
response.
@param decisionHandler The decision handler to call to allow or cancel the
navigation. The argument is one of the constants of the enumerated type WKNavigationResponsePolicy.
@discussion If you do not implement this method, the web view will allow the response, if the web view can show it.
*/
- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler
{
NSLog(@"决定是否在其响应已知后允许或取消导航。");
decisionHandler(WKNavigationResponsePolicyAllow);
}
修改为allow 就不报错了具体原因不太清楚。