iOS本地文件访问和webkit(iOS local file access and webkit)

编程入门 行业动态 更新时间:2024-10-24 21:24:12
iOS本地文件访问和webkit(iOS local file access and webkit)

我是iOS App开发的新手(我还没有真正开始,还处于设计阶段)。 我必须用我的应用程序完成的任务是从某个地方下载一个zip,将任何内容解压缩到本地存储并在嵌入的webkit小部件中显示其内容(带有javascript的html页面)。

问题是: 1)我的应用程序可以访问我的iPad存储内存的任何文件夹吗? 2)我的应用程序的嵌入式Webkit小部件是否能够显示本地html页面(如file:///somewhere/over/the/rainbow.html? 3)本地页面是否能够使用Ajax方法(通过httpxmlrequest)动态加载外部脚本或xml(也是本地存储的 - 即./something.xml)?

提前感谢您的帮助!

I'm absolutely new to iOS App development (I haven't actually started yet, still in a design phase). The task that I have to accomplish with my app is to download a zip from somewhere, extract anywere to local storage and display its content (html pages with javascript) in a embed webkit widget.

The questions are: 1) Will my app have access to any folder of my iPad storage memory? 2) Will my app's embedded Webkit widget be able to display local html pages (like file:///somewhere/over/the/rainbow.html ? 3) WIll that local page be able to use Ajax method (over httpxmlrequest) to dynamically load external scripts or xml (also locally stored - ie ./something.xml)?

Thank in advance for any help!

最满意答案

不,它无法访问任何文件。 应用程序在iOS上进行沙盒处理。 您只能访问应用包的内容和文档文件夹(应用程序独有的可写区域)。 是 - 如果所述内容属于(1)中提到的区域。 这就是基于Phonegap的应用程序的工作方式。 是的他们可以。 我们已经在我们的几个应用程序中广泛地完成了这项工作。 No it can't access any file. Apps are sandboxed on iOS. You can only access the app bundle's content and documents folder (a writable area unique to your app). Yes - provided said content is in the areas mentioned in (1). This is how Phonegap-based apps work. Yes - they can. We've done exactly this extensively in several of our apps.

更多推荐

本文发布于:2023-08-02 10:46:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1375445.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:本地文件   webkit   iOS   access   file

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!