Can anyone explain how to load local html file to WKWebView?
I tried with the below code works well in simulator but not on device
let path = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true)
let documentDirectoryPath: String = path[0]
let fileManager = FileManager()
let destinationURLForFile = URL(fileURLWithPath: documentDirectoryPath + "/" + "\(NameF.fileName)/\(NameF.Languages)/page_\(i + 1 ).html")
print("D2\(destinationURLForFile)")
let request = NSURLRequest(url: destinationURLForFile)
webView!.load(request as URLRequest)
Any suggestions would be helpful!