Running on macOS Big Sur (11.0.1), the code below perfectly loads and displays images, pdfs, html in a WKWebview but not docx or other files. I would like to preview files selected in my Mac app.
I get this error:
WebPageProxy::didFailProvisionalLoadForFrame: frameID = 3, domain = WebKitErrorDomain, code = 102
Please can someone help? Thank you.
import Cocoa
import WebKit
class ViewController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
I get this error:
WebPageProxy::didFailProvisionalLoadForFrame: frameID = 3, domain = WebKitErrorDomain, code = 102
Please can someone help? Thank you.
import Cocoa
import WebKit
class ViewController: NSViewController {
Code Block @IBOutlet weak var webView: WKWebView! let url = "https://filesamples.com/samples/document/docx/sample3.docx"
override func viewDidLoad() {
super.viewDidLoad()
Code Block // Do any additional setup after loading the view. let request = URLRequest(url: URL(string: url)!) webView.load(request) }
}