WKWebView 学习中的坑

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 就不报错了具体原因不太清楚。

最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容