I have created sample app for Cocoa Touch Framework and have passed WKWebView with sample url. I have used that framework in one of the app, and try to open wkwebview from main class. Below is my code of cocoa touch framework. Its always showing me Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service this message in console.
import UIKit
import WebKit
public class ConnectedAppController: UIViewController, WKNavigationDelegate {
var webView : WKWebView!
override public func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
public func opensampleWebView() {
let myBlog = "https://www.google.com/"
let url = NSURL(string: myBlog)
let request = URLRequest(url: url! as URL)
// init and load request in webview.
webView = WKWebView(frame: self.view.frame)
webView.navigationDelegate = self
self.view.addSubview(webView)
webView.load(request)
}
private func webView(webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
print(error.localizedDescription)
}
public func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
print("Strat to load")
}
public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
print("finish to load")
}