1

I'm trying to add iCloud Drive functionality to my iPhone app, by providing 2 features:

  • import a document which is stored on iCloud Drive to my local app
  • export a document from local store to iCloud Drive

The first part is done, and it was pretty easy. I used UIDocumentPicker with UIDocumentPickerModeImport to obtain a file url, which I just read to use the document in my app.

The second part, however, kind of confuses me. If I understand it correctly, all I have to do is instantiate a UIDocumentPicker with the file url of some document from the app local store, and the UIDocumentPicker will do all the rest (= saving to iCloud Drive, in case the user picks a location there).

Is this correct? Because this is what I've implemented. And while the files show up in the folder from picker selection, they will not sync neither to my Mac nor to www.icloud.com. So it seems like they are somehow stored in "the document picker on my phone", whatever this means.

Am I doing something wrong? The file I copied to the iCloud Drive folder on my mac perfectly showed up in the import-picker on the iPhone.

user826955
  • 3,137
  • 2
  • 30
  • 71
  • Don't you have problems with .icloud (unsynchronized) files ? Unsync files are returned as .icloud files by UiDocumentPickerViewController didPickDocument at ...Don't know how to have the proper files – vomi Jan 18 '19 at 15:53

1 Answers1

0

Actually, the files just turned up in finder (and also www.icloud.com). So it must have been some sync issue, or it just takes a while for it to sync.

Question answered/closed :)

user826955
  • 3,137
  • 2
  • 30
  • 71