I am pulling in HTML content via an API that loads JSON and would like to use WKWebView in order to display it. Is it possible to use WKWebView without a URL?
This controller is built programmatically, so the webView is added as Subview. In the long run I will have the webView display below other content that is also pulled from the API.
This is the code I have:
var webView = WKWebView()
webView = WKWebView(frame: scrollView.bounds, configuration: WKWebViewConfiguration())
webView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
scrollView.addSubview(webView)
webView.navigationDelegate = self as? WKNavigationDelegate
webView.loadHTMLString("<html><body>\(self.articleBody)</body></html>", baseURL: nil)
I get this error when I load my app:
Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
In testing with a random URL and no HTML it works just fine.
I've looked at this question, but it doesn't have an answer that makes sense for me: com.apple.WebKit.WebContent drops 113 error: Could not find specified service