We recently updated our app to utilize the work-around suggested by Kevin Elliott. We're happy to report this work-around operates correctly with a USB drive on an iPad running iPadOS 18.6. Thus, we marked his answer as "accepted".
Specifically, our app now uses asCopy:NO when initializing UIDocumentPickerViewController. Our code then calls NSFileManager, which copies the selected file as a security-scoped resource to a local (i.e., private) folder in NSTemporaryDirectory(). Our app then processes this local file as before.
We added a new phase to the beginning of our progress meter, which informs the user their selected file is being copied to the device.
We appreciate Kevin's insight on this topic and his ability to point us in the right direction!
As requested, we updated FB16131472 to show the asCopy:YES variant is still broken on iPadOS 18.6.2.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: