UIDocumentPickerViewController 3rd party providers greyed out

I’m following this, in order to pick a folder:
https://developer.apple.com/documentation/uikit/view_controllers/providing_access_to_directories

let documentPicker = UIDocumentPickerViewController(documentTypes: [kUTTypeFolder as String], in: .open)
documentPicker.delegate = self
present(documentPicker, animated: true, completion: nil)

The problem is Google Drive and Dropbox cannot be selected, how do I solve this?

Hi @bass, have you tried changing the document types to see if that works? Example,

let documentPickerController = UIDocumentPickerViewController(documentTypes: [String(kUTTypePDF), String(kUTTypeImage), String(kUTTypeMovie), String(kUTTypeVideo), String(kUTTypePlainText), String(kUTTypeMP3)], inMode: .import)
documentPickerController.delegate = self
present(documentPickerController, animated: true, completion: nil)

This topic was automatically closed after 166 days. New replies are no longer allowed.