I can pick gallery images with UIImagePickerController
and documents with UIDocumentPickerViewController
. But my question is, is there any way to pick gallery image and pdf documents with same picker?
I have tried UIDocumentPickerViewController
with documentTypes
as kUTTypePDF
and kUTTypeImage
. But it only opens the files directory with iCloud drive and on my iPhone directory.
let docPicker = UIDocumentPickerViewController(documentTypes: [kUTTypePDF as String, kUTTypeImage as String], in: .import)
Is there any way I can pick both gallery or camera roll images and pdf documents with one picker?