UIDocumentInteractionController - 我们自己的应用程序显示在列表中 [英] UIDocumentInteractionController - our own app shows up in list

查看:258
本文介绍了UIDocumentInteractionController - 我们自己的应用程序显示在列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的应用程序可以处理说Pages文件作为示例,并且需要将文件传递给其他应用程序以及从其他应用程序接收文件。

Our app can deal with say Pages files as an example and needs to both hand off files to other applications as well as receive files from other applications.

因此我们编辑plist CFBundleDocumentTypes以表示我们可以处理Pages文件。 ('默认')模式。

So we edit the plist CFBundleDocumentTypes to say that we can deal with Pages files. ('Default') mode.

当用户想要将.pages文件发送到另一个应用程序(可能是Pages应用程序)时,我们调用UIDocumentInteractionController。

When the user wants to send a .pages file onto another application (Likely the Pages app) then we call UIDocumentInteractionController.

UIDocumentInteractionController(太)忠实地列出了所有可以处理.pages文件的应用程序,并且我们在列表中。我认为这让用户感到困惑,为什么我会使用UIDocumentInteractionController将文件传递给美国?我们如何摆脱列表?

The UIDocumentInteractionController (too) faithfully lists all applications that can deal with .pages files, and WE are on the list. I think that's confusing to the user, why would I use the UIDocumentInteractionController to hand a file off to US? How do we rid ourselves from the list?

推荐答案

一种解决方法是取消注册您的应用程序,因为它能打开这个文件类型在显示UIDocumentInteractionController之前,在它被解除之后将其注册回来。

One workaround would have been to unregister your application as capable of opening this file type before showing the UIDocumentInteractionController, and register it back after it's dismissed.

但是,因为你的应用程序能够打开的文档类型在Info.plist中使用CFBundleDocumentTypes指定键,您无法在运行时修改它。太糟糕了。

But as the document types that your application is capable of opening is specified in the Info.plist with the CFBundleDocumentTypes key, you can't modify it at runtime. Too bad.

我在API中看不到任何其他有用的东西。

I don't see anything else helpful for this in the APIs.

你最好的希望是在雷达上提交功能请求(Apple的错误报告数据库) https://bugreport.apple.com 和为什么不在 http://www.openradar.me 上公开您的请求,以煽动他人这样做。

Your best hope is to file a feature request on radar (Apple's bug report database) https://bugreport.apple.com and why not make your request public on http://www.openradar.me to incite others to do the same.

这篇关于UIDocumentInteractionController - 我们自己的应用程序显示在列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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