I'm having a hard time with this one. I'm not really sure what I'm doing wrong.
Here's how I'm doing it for iOS UIWebView:
let url = Bundle.main.url(forResource: "index", withExtension: "html")
let request = NSURLRequest(url: url!)
webView.loadRequest(request as URLRequest)
Unfortunately, that doesn't work for an OS X app. I found some code which used to work with Swift 2. I made some changes to it to make it work with Swift 3, but I'm still getting an error.
let url = Bundle.main.url(forResource: "index", withExtension: "html")
self.webView.mainFrame.load(NSURLRequest(URL: NSURL(string: url)!))
What are my options? Thanks in advance!