WKWebView 學(xué)習(xí)中的坑

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] 當(dāng)主服務(wù)器接收到服務(wù)器重定向時調(diào)用
2018-04-11 10:40:57.924879+0800 XXX[1997:73994] 決定是否在其響應(yīng)已知后允許或取消導(dǎo)航。
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(@"決定是否在其響應(yīng)已知后允許或取消導(dǎo)航。");
    decisionHandler(WKNavigationResponsePolicyAllow);
}

修改為allow 就不報(bào)錯了具體原因不太清楚。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容