My app works with pictures and annotations files. The annotation files are just XML
files containing information for each picture. That way, a user can have for example a dataset of 100 pictures + 100 annotation files.
At some point I want the user to be able to export those files to a cloud service, ideally iCloud or Google-Drive, so that they are available for further processing/work.
The Files App looked the best candidate for this task. The user has already connected their cloud providers in the Files App, and I don't need to worry about almost anything.
func presentLocationPicker(forExportingFiles urls: [URL]) {
let documentPicker = UIDocumentPickerViewController(urls: urls, in: .exportToService)
self.present(documentPicker, animated: true)
}
I thought it would be easy, but the reality is quite different. The integration of Google Drive with the Files App seems very weak. I have the following problems with Google Drive:
Blocker 1 - When selecting the google drive folder I want to export the files, I get the following system alert: The Operation Can't Be Completed. Couldn't communicate with the helper application
Blocker 2 - When presenting the UIDocumentPickerViewController
the list of cloud providers is sometimes greyed out.
Blocker 3 - If directly from the Files App
I try to move a folder (with 100 items for example) to Google Drive, it does not work either. Only some files are copied, and not with the original folder structure. Just a mess.
So my first question is: Am I supposed to do something different with UIDocumentPickerViewController
to avoid Blocker 1?
Second question is: Is there any other way of exporting multiple files (more than 100) to the user's Google Drive account? I am out of ideas.