iPhone 移动 Safari 文件系统访问
是否可以在本机 iPhone 应用程序中写入文件,并在从本机应用程序打开浏览器后让 Safari 浏览器从该文件中读取文件?
或者(这会很棒!),是否可以从本机 iPhone 应用程序启动移动 Safari Web 应用程序,并让该应用程序访问 OS 3.0 外部附件框架?我的假设是否定的...
基本上,我有一个功能正常的 iPhone 应用程序,它包装了一个简单的移动 Safari Web 应用程序,但是一旦我从 iPhone 应用程序启动了 Safari Web 应用程序,我想利用外部附件框架...
Is it possible to write to a file in a native iPhone application and have a Safari browser read from that file after having the browser opened from the native app?
Alternatively (and this would be great!), would it be possible to launch a mobile Safari webapp from a native iPhone app, and have that application access the OS 3.0 External Accessory Framework? My assumption is no...
Basically, I have a functioning iPhone app that wraps a simple mobile Safari webapp, but I'd like to utilize the external accessory framework once I have launched the Safari webapp from the iPhone app...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用phonegap框架:它提供了一个项目模板和库来访问javascript中的本机功能(例如写入/读取文件)。
还要考虑本地存储和 SQLLite DB...
You can use the phonegap framework : it provide a project template and libraries to access native function in javascript (like writing/reading a file).
Consider also the localstorage and the SQLLite DB...
有两种不同的解释。如果您想从您的应用启动 MobileSafari,那么答案将是否,因为MobileSafari 和您的应用是通过沙箱隔离的。但是您可以在 URL 中包含详细信息,如
http://example.com?info=SXMgaXQgcG9zc2libGUgdG8gd3JpdGUgdG8gYSBma...
但您可以在应用程序中嵌入 UIWebView,那么答案将是是(对于 UIWebView),因为您可以使用任何 ObjC 代码与 Web 视图进行通信。
There are 2 different interpretations. If you want to launch MobileSafari from your app, then the answers will be no since MobileSafari and your app are isolated by sandboxes. But you may include the detail in the URL like
http://example.com?info=SXMgaXQgcG9zc2libGUgdG8gd3JpdGUgdG8gYSBma…
But you can embed a UIWebView in your app, then the answers will be yes (to the UIWebView), since you may communicate with the web view with any ObjC code.