Home  >  Q&A  >  body text

ios - WKWebview加载本地HTML报错“Could not create a sandbox extension for /”

Hybrid模式开发App,我准备在项目根目录里托人HTML源文件,待App启动的时候将HTML源文件复制到沙盒去进行加载,而后迭代的时候则直接下载到沙盒这样的逻辑。

然后我在真机测试的时候,WKWebView报错:"Could not create a sandbox extension for /",
但我所加载的文件路径不是在根目录,路径是:“file:///var/mobile/Containers/Data/Application/ECB56C0C-343C-4338-8030-1287119301D1/Documents/Pakeage/HtmlFile/3dker/index.html#

查询得到的结果是说ios 9.0以下版本, WKWebview不支持load项目根目录下的HTML源文件,引用的文章是这篇
解决Could not create a sandbox extension for /

请问,这是什么问题

巴扎黑巴扎黑2712 days ago1118

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-18 09:17:57

    Put the html into the temp directory, and then load the html file under temp.
    After actual testing, everything works normally under temp, including using baseURL and one or more css and js files.

    reply
    0
  • Cancelreply