我正在从WKWebView中的本地设备HTML页面加载https://google.com。我使用以下代码加载HTML页面。
let folderURL = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0]
let diectory1 = "Contents/" + self.BookDirectory + "/" + file
let htmlPath = folderURL.appendingPathComponent(diectory1).path
let folderPath = folderURL.path
let baseUrl = URL(fileURLWithPath: folderPath, isDirectory: true)
let htmlURL = URL(fileURLWithPath: htmlPath, isDirectory: false)
wkWebView.loadFileURL(htmlURL, allowingReadAccessTo: folderURL)
再次加载本地html后出现此错误
ProvisionalPageProxy::didFailProvisionalLoadForFrame: pageID = 1, frameID = 1, navigationID = 2
wkwebview一直显示https://google.com页