I want to initialize an UIDocumentPickerViewController from a framework. But, the files (.pdf) are shown as grayed out in the document picker when using below code in framework. The code works fine when UIDocumentPickerViewController is initialized in the main app target. This is what I use.
let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [.pdf])
documentPicker.delegate = self
present(documentPicker, animated: true, completion: nil)