UIDocumentInteractionController - our own app shows up in list

北慕城南 提交于 2020-01-23 08:32:47

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/3167590/uidocumentinteractioncontroller-our-own-app-shows-up-in-list

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!