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?
Asked
Active
Viewed 30 times
-1
-
Could you go into more detail, please? – Torrontés May 16 '23 at 16:28
1 Answers
0
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.

HangarRash
- 7,314
- 5
- 5
- 32
-
-
No, there isn't. There's no API that alters the behavior of any of these browsers/pickers. Though in the case of `CNContactPickerViewController`, you can implement your own picker view controller since the Contacts framework gives you full access to the data you would need. But for the file browsers, there's no way to replicate the functionality with other APIs. – HangarRash May 16 '23 at 18:05