有没有办法限制UIDocumentInteractionController中显示的应用程序?
我目前正在显示一个UIDocumentInteractionController,以便我的应用程序的用户可以在另一个应用程序中打开一个文件。控制器弹出并列出应用程序没有问题。但是,它还会显示Cloud应用程序,例如Dropbox(我假设它几乎与每个有效的文件类型相关联),这非常令人讨厌。无论如何我可以指定控制器只显示我想要的应用程序吗?
I am currently displaying a UIDocumentInteractionController so that the user of my App can open a File in a different App. The controller pops up and lists the App with no problem. However, it also displays Cloud apps such as Dropbox (which I'm assuming associate themselves with nearly every valid file-type), which is quite annoying. Is there anyway that I can specify the controller to only display the App I want?
不,你不能过滤这个列表。如果他们愿意,您不能告诉用户他们无法将文件发送到Dropbox。 :)
No, you cannot filter this list. You're not allowed to tell the user that they can't send your file to Dropbox if they want. :)
(如果您只有一个特定的应用程序可以发送您的文件,并且您可以控制或与该应用程序建立合作关系,那么您可以同意在一些其他模糊的文件类型上使用,或直接通过自定义URL进行通信。 UIDocumentInteractionController
是为允许用户在任何需要的地方传送文件的一般情况而设计的,并且云服务可以是放置标准类型文件的完美有效位置。)
(If you have only one specific app that makes sense to send your file to, and you can control or have a partnership with that app, then you can agree on some other obscure file type to use, or communicate directly by custom URL. UIDocumentInteractionController
is designed for the general case of allowing the user to shuttle files wherever they might need them, and cloud services can be perfectly valid places to put files of standard types.)