How can I programmatically force an iCloud Drive sync in my iOS app?

Viewed 431

I use FileManager.default.contentsOfDirectory to get the content of an iCloud Drive directory. However, sometimes, when I removed a file on my Mac, the content is not up to date. I can force a synchronization by opening the Files app on my iPhone and browse to that directory. Afterwards, the change is also visible in my iOS app.

My question: How can I manually and programmatically force a synchronization of iCloud Drive between my iOS device (iPhone) and iCloud?

0 Answers
Related