iosutiuidocumentbrowserviewcontroller

UIDocumentBrowserViewController and suported file types


I am working on an app which handles only jpeg files, with UIDocumentBrowserViewController as root VC. I have set things up to be able to successfully open those files, but files of other types are still shown (dimmed out) in the browser. Is there any way to completely hide files of types not handled by my app?


Solution

  • No. What you are seeing is standard behavior in iOS and macOS.

    The same behavior is also seen in UIDocumentPickerViewController and CNContactPickerViewController, for example. The full list is always shown but only qualified values are selectable. Others are grayed out.

    You also see this in Xcode when you select the File | Add Files to "Project"... menu. The file picker shows all files but unselectable files are grayed out.