UIManagedDocument does not play nicely with non-iCloud cloud providers in UIDocumentBrowserViewController

Originator:appsolutelyfun
Number:rdar://6905951 Date Originated:August 2, 2019
Status:open Resolved:no
Product:UIManagedDocument, UIDocumentBrowserViewController Product Version:iOS 12.4
Classification:UIKit Reproducible:yes
 
Attempting either to *copy/move* or *create* a new UIManagedDocument using a non-iCloud cloud provider's file extension via the UIDocumentBrowserViewController results in failure— the document fails to be copied/moved/created.

I've been able to produce this failure on both an iPad Pro (9.7-inch) and an iPhone 6s Plus running iOS 12.4.  In a UIDocumentBrowserViewController, trying to copy/move or create a UIManagedDocument on Dropbox, Box, OneDrive, or Google Drive via their respective file provider extensions always fails, even though performing the same task for iCloud Drive or local storage via the UIDocumentBrowserViewController succeeds. 

(In case it's separately useful for you to know, *no* UIDocumentBrowserViewController-initiated file operation for *any* app seems to work for the Google Drive file provider extension.)

My workaround for the issue has been to use a UIDocument (rather than UIManagedDocument) class, where the UIDocument is the wrapper for a model object backed by a Core Data store.  Reads/writes of the UIDocument are of dictionaries constructed from the Core Data objects.

I suspect that the problem that the non-iCloud cloud providers have processing UIManagedDocuments has to do with the package nature of UIManagedDocuments (where the UIManagedDocument package consists of a StoreContent folder containing the persistentStore, persistentStore-shm, and persistentStore-wal files).  The cloud provider extensions seem to choke on that package format, in a way they don't on UIDocument's single-file format.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!