On my application, i use UIDocumentPickerViewController
to allow the user to pick files (import), but starting from iOS 13 that functionality stop working, basically the document picker is open, but the user can't choose a file (taping the file does nothing).
I made a simple sample just to isolate the code:
class ViewController: UIViewController, UIDocumentPickerDelegate {
@IBAction func openDocumentPicker(_ sender: Any) {
let types = [String(kUTTypePDF)]
let documentPickerViewController = UIDocumentPickerViewController(documentTypes: types, in: .import)
documentPickerViewController.delegate = self
present(documentPickerViewController, animated: true, completion: nil)
}
func documentPickerWasCancelled(_ controller: UIDocumentPickerViewController) {
print("Cancelled")
}
func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
print("didPickDocuments at \(urls)")
}
}
Sample project: https://github.com/Abreu0101/document-picker-iOS13-issue
documentPicker(_, didPickDocumentAt)
gets called the first time after a fresh launch of my app, but fails on all subsequent attempts. This happens both in the Recents and Browse tab, with iCloud Drive and Dropbox. I'm running on a physical iPhone X with iOS 13.1 beta 3, building with Xcode 11.0 GM. – Electrophone