UIDocumentPickerViewController with type .folder won't give access to files inside selected folder

Hi, I followed the instructions here: https://developer.apple.com/documentation/uikit/view_controllers/providing_access_to_directories

but when trying to get access to each file inside the selected folder (tried iCloud and iPhone) it always fails. Instead, if I specify a type of file on the Controller (say .audio) I can read the file fine...

Did anything change which is not documented in that page? Do I have to set any other permission or capability? (I have iCloud Documents)

Thanks!!

have your tried .directory ? Maybe could also be how you handle the documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) cos iCloud likes to append extensions onto the expected files. I can't recall top of my head how exactly but .png would change yo something like .png.icloud

.directory doesn’t let me select folders. The picker only shows a cancel button. The urls seem ok and if I configure the picker to select files I can access them. It seems like a change from when the apple document was written because I’m only getting access to the selected folder and it’s file list.… thanks!!

UIDocumentPickerViewController with type .folder won't give access to files inside selected folder
 
 
Q