在 Mobile safari 中从 url 打开应用程序失败,扩展名为 .zip
我已经使用了这篇精彩文章中的信息 如何将文件类型与 iPhone 应用程序关联? 以便从 Mail 启动我的应用程序,同时使用 mydoc.foo 和压缩版本 mydoc.foo.zip > 它会神奇地自动解压到我的应用程序沙箱中。
我可以打开一个网址,例如 http://blah.com/shared/mydoc.foo< /a> 使用 Safari 进入我的应用程序,但当 url 为 http: //blah.com/shared/mydoc.foo.zip 当我使用在 MyApp 中打开时,我收到消息无法打开文档加载页面上的按钮。
我想知道需要在我的 info.plist 中添加什么才能使这个特定的 URL 正常工作,因为 Safari 将我的应用程序识别为该扩展集的接收者,并且 Mail 表现得非常好。
它没有击中 - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
委托方法。
I have used the info in this great post How do I associate file types with an iPhone application? to get my app launching from Mail with both mydoc.foo and the compressed version mydoc.foo.zip which auto-magically decompresses into my apps sandbox.
I can open a url such as http://blah.com/shared/mydoc.foo into my app with Safari but when the url is http://blah.com/shared/mydoc.foo.zip I get the message Unable to open Document when I use the Open in MyApp button on the loaded page.
Im wondering what needs adding to my info.plist to get this particular URL working as Safari recognises my app as the receiver for this extension set and Mail behaves perfectly well.
Its not hitting the- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
delegate method.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您想要接受 .zip 文件并且您链接的页面接受 .gz 文件,因此请确保您指定了
com.pkware.zip-archive
UTI 而不是org.gnu .gnu-zip-archive
。Since you want to accept .zip files and the page you've linked accepts .gz files, make sure you've specified a
com.pkware.zip-archive
UTI instead oforg.gnu.gnu-zip-archive
.