I am using UIDocumentInteractionController
for showing popover menu "Open In..." so that user can open a document in other application.
Method presentOpenInMenuFromBarButtonItem:animated:
returns NO
in case there is no application able to open given document (menu will not show). But it is too late for me to wait until getting so far. I would like to disable the button initiating that opening if it is not possible instead of raising expectations of an user and then say "sorry, it is not possible to open it".
Is it possible to query system to see if there is at least one application registered for particular document type? I have checked canPreviewItem:
in QLPreviewController
, but it seems it doesn't support the same document types which UIDocumentInteractionController
can handle.