didPickDocumentAtURL not called when using UIDocumentPickerViewController

An app that has used the UIDocumentPickerViewController since iOS 8 no longer works in iOS 13 or iPadOS 13 (though in some betas the mechanism did work until a device wipe). The console logs show an error similar to the following:


error 04:55:25.855765 -0700 fileproviderd [ERROR] Failed to create key for file entry (null)

default 04:55:25.856903 -0700 ReportCrash SimulatedCrash requested by fileproviderd, code 5, reason '<private>'

default 04:55:25.856982 -0700 ReportCrash starting prolongation transaction timer

fault 04:55:25.859453 -0700 fileproviderd [SIMCRASH] Failed to create ACL entry for <private>:(null) -> <private> (Error Domain=SqliteErrorDomain Code=12 "no result found" UserInfo={NSDescription=no result found, SqliteExtendedCode=12})


I've not seen any changes in documentation or mentions in the release notes for this mechanism. Are code changes needed to continue sharing documents in this way?

For what it's worth, I am successfully using UIDocumentPickerViewController on iOS 13. I'm running on a real device running iOS 13 beta 4, which is the first beta I installed. I've not tried in the simulator but have no idea if that's relevant. I can pick images and PDFs from iCloud, Dropbox and Gladys file providers.


I recently increased my minimum build version to iOS 11 so I also changed the delegate method I was using from didPickDocumentAtURL to didPickDocumentsAtURLs to fix the deprecation of the old method in iOS 11.

Thanks. Tried bumping the minimum version on both sides of the sharing operation, but still get the same error. I had added didPickDocumentsAtURLs earlier while trying to resolve this. That did not change the behavior. Out of curiousity, have you reset the device? I have seen this work (without mods) prior to a device reset.

My testing on a real device is an 10.5" iPad Pro that was upgraded from iOS 12.x (I forget the exact number). I have NOT done a full device reset (and I don't want to - just in case!)

In my case, this turned out to be what appears to be lack of respect for NSExtensionFileProviderSupportsEnumeration set to NO in the Info.plist for the file provider target. I am not sure what to make of the variable behavior across betas and resets (feels uninitialized memory-ish). See https://forums.developer.apple.com/message/375894#375894

didPickDocumentAtURL not called when using UIDocumentPickerViewController
 
 
Q