I am having problems with UIDocumentPickerViewController. The didPickDocumentsAtURLs delegate is not getting called when selecting a file in the picker controller. The delegate is working because documentPickerWasCancelled is corrected called when Cancel is pressed. I am using public.xml to specify GPX documents (I may narrow it down later) and they are correctly enabled, but for some reason the delegate is not called when they are tapped.
In the log I see a "Failed to associate thumbnails for picked URL" warning when a file is tapped but apparently this is not an issue (according to https://stackoverflow.com/questions/51793060/icloud-drive-issue-documentmanager-failed-to-associate-thumbnails-for-picked).
I am using iOS 12.4 and have tried with both single and multiple selection. I have added iCloud capabilities and linked the MobileCoreServices framework, but neither made any difference.
Has anyone got any idea what I am doing wrong?