When the user enables iCloud in my app, I need to move all local files to iCloud. Here, I use setUbiquitous:itemAtURL:destinationURL:error:
to move each file. The problem is, if (for any local file) the same file URL already exists on iCloud, this method fails.
My question is, how can I determine which file is newer (local vs iCloud) so that I can either overwrite the iCloud version or discard the local version for each file? Or, could I somehow force iOS to perform the upload and set the file state into conflict on iCloud so that my conflict resolution methods would take over and handle this?