I use document packages in my application (via FileWrapper API) and I am using the UIDocumentBrowserViewController class for document management. The document package basically represents a hierarchy of (text) files and folders. Everything works just fine when the documents are stored on the device or in the iCloud. But things are different when I try to create a document in a remote location, access to which is provided by a third-party file providers, such as Google Drive, Microsoft One Drive or Dropbox. Every time I try to create a document in any of those locations my call to importHandler(fileURL, .move):
Dropbox: fails with generic error message: "The operation couldn’t be completed. (DBFileProviderErrorDomain error 1.)";
Google Drive: fails with a slightly different message: "The operation couldn’t be completed. (com.apple.DocumentManager error 1.)"
MS OneDrive: appears to succeed but upon trying to open the newly created document the app is handed an OS_dispatch_data object instead of a FileWrapper object, which it is expecting.
I am not sure what’s going on. The only thing I can think of is that document packages are only supported on Apple file systems.
Any suggestion is greatly appreciated. Thank you.