Starting with iOS 13, opening a file in iCloud fails with: Code=256 "The file couldn’t be opened."

Starting with iOS 13 I'm receiving error reports from users that cannot open their iCloud documents anymore. The error is each time:


Error Domain=NSCocoaErrorDomain Code=256 "The file “Untitled.txt” couldn’t be opened." UserInfo={NSURL=file:///private/var/mobile/Library/Mobile%20Documents/iCloud~com~myapp/Documents/Untitled.txt}


Code 256 means: NSFileReadUnknownError


Restarting the device solves the problem each time, but I get a lot of error reports.


My app does check the availability of iCloud documents (it uses file coordination and UIDocument). This used to work fine before iOS 13.


Has anybody seen a similar issue? What could be causing this and how could I collect more useful debug information to get to the bottom of this?

I filed a DTS request and it seems to be an issue with iCloud Drive. The fix is supposed to come with iOS 13.3. For reference:

< Radar://58360472>
Starting with iOS 13, opening a file in iCloud fails with: Code=256 "The file couldn’t be opened."
 
 
Q