I am using WKWebView for viewing custom HTML.
Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
in 29 sec after WKWebView content loaded, sometimes I even receive this error twice. Clearly, it is a configuration issue. I have checked cookies as proposed in Could not signal service com.apple.WebKit.WebContent, however it doesn't helpFinally, solved the problem above. I was receiving errors
Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
Since I have not added WKWebView object on the view as a subview and tried to call -loadHTMLString:baseURL:
on the top of it. And only after it was successfully loaded I was adding it to view's subviews - which was totally wrong. The correct solution for my problem is:
1. Add WKWebView object to view's subviews
array
2. Call -loadHTMLString:baseURL:
for recently added WKWebView
I too faced this problem when loading an 'http' url in WKWebView in iOS 11, it is working fine with https.
What worked for me was setting App transport setting in info.pist file to allow arbitary load.
<key>NSAppTransportSecurity</key>
<dict>
<!--Not a recommended way, there are better solutions available-->
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Maybe it's an entirely different situation, but I always got WebView[43046:188825] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
when opening a webpage on the simulator while having the debugger attached to it. If I end the debugger and opening the app again the webpage will open just fine. This doesn't happen on the devices.
After spending an entire work-day trying to figure out what's wrong, I found out that if we have a framework named Preferences
, UIWebView
and WKWebView
will not be able to open a webpage and will throw the error above.
To reproduce this error just make a simple app with WKWebView
to show a webpage. Then create a new framework target and name it Preferences
. Then import it to the main target and run the simulator again. WKWebView
will fail to open a webpage.
So, it might be unlikely, but if you have a framework with the name Preferences
, try deleting or renaming it.
Also, if anyone has an explanation for this please do share.
BTW, I was on Xcode 9.2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With