Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
I'm getting this message regularly in iOS when I try to load HTML in WKWebView. Also it's repeating when I open a WKWebView page.
WKWebViewConfiguration *conf = [[WKWebViewConfiguration alloc] init];
_articleWebView = [[WKWebView alloc] initWithFrame:_mainView.containterViiew.bounds configuration:conf];
_articleWebView.navigationDelegate = self;
_articleWebView.scrollView.scrollEnabled = NO;
[_mainView.containterViiew addSubview:_articleWebView];
[_articleWebView loadHTMLString:_articleDesc.pageContent baseURL:nil];
Also I'm trying to get the content height of the WKWebView in finish method. When the above error occurs, I am getting different height values.
- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation {
[webView evaluateJavaScript:@"document.readyState"
completionHandler:^(id complete, NSError * _Nullable error) {
if (complete != nil) {
NSString *javascriptString = @"var body = document.body;var html = document.documentElement;Math.max(html.offsetHeight);";
[webView evaluateJavaScript:javascriptString
completionHandler:^(id _Nullable result, NSError * _Nullable error) {
if (!error) {
NSNumber *height = result;
NSLog(@"height ----------->>>%@", height);
});
}
}];
}