下载文档后是否具有“打开方式"功能? [英] 'Open In' functionality after downloading document?

查看:95
本文介绍了下载文档后是否具有“打开方式"功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个iOS应用,该应用允许用户从服务器上下载文档.我知道这个工作正常,他们甚至可以查看文档.不过,我想要的是使文档具有打开方式"操作,因此,当按下按钮时,用户可以选择另一个应用程序,让您可以查看PDF文档-例如Kindle App .这可能吗?

解决方案

该死,我希望你能说"MacOS",因为那样会使答案变得更加有趣(并且可行).

据我所知,iOS仍然没有官方的SDK合法方法来让一个应用程序(您的应用程序)任意启动另一个应用程序并指定要打开的任意文件.这是必须住在自己的应用程序沙箱中的魔术(?)的一部分.

在Macintosh上,使用Apple Events(除其他事项外)会很容易.

I am developing an iOS app that allows users to download documents off a server. I have gotten this to work fine and they can even view the document. What I want, though, is for the document to have an 'Open In' action so, when a button is pressed, the user is able to select another application that allows you to look at PDF documents -- for example, the Kindle App. Is this possible?

解决方案

Darn, I was wishing you were going to say "MacOS" because that would have made the answer a lot more fun (and do-able).

As far as I know, iOS still does not have an official SDK-legal way to have one app (your app) arbitrarily launch other app and specify an arbitrary document to open with it. This is part of the magic (?) of having to live within your own app sandbox.

On the Macintosh, this would be easy with Apple Events (among other things).

这篇关于下载文档后是否具有“打开方式"功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆