I have a UIDocumentPickerViewController with a filetype of "public.folder" (I've also tried kUTTypeFolder), where a user can pick a default directory for files to be saved. It pulls up the correct UI for selecting folders, however, all third-party providers (Google Drive, Dropbox, etc.) are all grayed out and can't be selected. I can select iCloud Drive and On My iPhone just fine.
Here's my function for showing the controller:
@IBAction func pickDefaultDirectory(_ sender: Any) {
let documentPicker = UIDocumentPickerViewController(documentTypes: ["public.folder"], in: .open)
documentPicker.delegate = self
self.present(documentPicker, animated: true, completion: nil)
}
This is what every "pick folders via UIDocumentPickerViewController" article I've found says to do, but I've had no luck. Does anyone know why this is happening? Am I just forgetting something in there?
According to Dropbox developers, this isn't supported at the moment.
The Dropbox document picker doesn't support opening folders, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
Dropboxforum
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With