在 Mobile safari 中从 url 打开应用程序失败,扩展名为 .zip

发布于 2024-10-09 20:00:40 字数 975 浏览 0 评论 0原文

我已经使用了这篇精彩文章中的信息 如何将文件类型与 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫九 2024-10-16 20:00:40

由于您想要接受 .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 of org.gnu.gnu-zip-archive.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文