I am using a Smart App Banner to promote an application and it works well! However, I would like to load the link i’m navigating in my webView(I am using a WKWebView) when clinking on the Smart App Banner.
Here is the following code that I am using in my AppDelegate.swift file:
var vc = ViewController()
func application(application: UIApplication, openURL url: NSURL,sourceApplication: String?, annotation: AnyObject) -> Bool {
let url1 = NSURL(string:"\(url)")!
self.vc.webView!.loadRequest(NSURLRequest(URL: url1!))
return true
}
and it's not working!