UIdocumentPickerViewController doesn't pick PDF's from the simulator

378 views Asked by At

Here is the code that presents the picker when clicked on a button. I've tried the same on a different mac device and it worked just fine. Not sure what's different. Any help would be appreciated. Thanks!

var controller: UIDocumentPickerViewController!
        if fromPDF {
            controller = UIDocumentPickerViewController(documentTypes: ["com.adobe.pdf"], in: .import)
        } else {
            controller = UIDocumentPickerViewController(documentTypes: ["public.data", "public.content", "public.text", "public.image"], in: .import)
        }
        controller.delegate = self
        present(controller, animated: true, completion: nil)

This is what I see when the picker is presented

0

There are 0 answers