【问题标题】:Cordova / Phonegap and iOS 8.1 path to LibraryCordova / Phonegap 和 iOS 8.1 库路径
【发布时间】:2014-11-06 13:52:24
【问题描述】:

我使用 cordova 将 HTML / JS 项目编译为应用程序。

我所做的是使用位于应用程序本身公用文件夹中的资产,例如:

../../../../Library/Caches/data/media/image.png

在 iOS 8.1 之前它运行良好。媒体文件在文件夹中,但由于某种原因无法在 /www 中加载。

在 iOS 8.1 中这条路径有什么改变吗?

我使用 Cordova 3.1.0 。我需要更新吗?

为了完成这项工作,我必须进行哪些更改?谢谢!

【问题讨论】:

  • 对于 iOS8 你需要在cordova 3.6.x
  • 是的,我已经做到了。将 Cordova 更新到 3.6 后如何访问 Cache 文件夹?

标签: html ios cordova ios8


【解决方案1】:

好的,我解决了我的问题。 这是我的资产路径:

../../../../Library/Caches/[path to file]

现在,与 Cordova 3.6 + 文件插件(不知道是否强制)一起使用的是:

cdvfile://localhost/cache/[path to file]

链接: http://cordova.apache.org/news/2014/02/10/plugins-release.html

(Phonegap + iOS) Why when I get the full path of the filesystem in a device or simulator I get only "/"?

http://plugins.cordova.io/#/package/org.apache.cordova.file

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-03
    相关资源
    最近更新 更多