UIDocumentInteractionController - 我们自己的应用程序显示在列表中
例如,我们的应用程序可以处理页面文件,并且需要将文件移交给其他应用程序以及从其他应用程序接收文件。
因此,我们编辑 plist CFBundleDocumentTypes 来表示我们可以处理 Pages 文件。 (“默认”)模式。
当用户想要将 .pages 文件发送到另一个应用程序(例如 Pages 应用程序)时,我们调用 UIDocumentInteractionController。
UIDocumentInteractionController(也)忠实地列出了所有可以处理 .pages 文件的应用程序,WE 也在列表中。我认为这让用户感到困惑,为什么我要使用 UIDocumentInteractionController 将文件交给我们?我们如何将自己从名单中删除?
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.
So we edit the plist CFBundleDocumentTypes to say that we can deal with Pages files. ('Default') mode.
When the user wants to send a .pages file onto another application (Likely the Pages app) then we call 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种解决方法是在显示 UIDocumentInteractionController 之前取消注册您的应用程序,使其能够打开此文件类型,并在关闭后将其重新注册。
但由于您的应用程序能够打开的文档类型是在 Info.plist 中使用 CFBundleDocumentTypes 键指定的,因此您无法在运行时修改它。太糟糕了。
我在 API 中没有看到任何其他对此有帮助的内容。
您最好的希望是在雷达(Apple 的错误报告数据库)https://bugreport.apple.com 为什么不在 http://www.openradar.me 上公开您的请求以煽动其他人这样做相同。
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.
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.
I don't see anything else helpful for this in the APIs.
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.