/var/mobile/Containers/Data/Application/0D091A98-C68A-4A76-BB8B-CD16DA2B472F/Documents/iTestWav/File/itest_web/dist/index.html
webView.loadFileURL(requestURL, allowingReadAccessTo: accessURL)访问本地网页报错:Could not create a sandbox extension
原因如下:
var documentDirectoryPath:String? = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first
documentDirectoryPath这个是绝对路径,不能把绝对路径保存到Defaults或者数据库中进行重新访问,因为更新版本,绝对路径有变动;