Can app developers control the way their app handles iCloud save conflicts?
I saved data to iCloud on laptop A, then opened the document on laptop B to update a part of it (with data only available on laptop B). After saving on laptop B, I realized that iCloud didn't give me the latest data that I had previously saved on laptop A, which was more important than what I was adding.
So I committed the new info to memory, and went back to laptop A, and added it to the document that needed it.
Later (after a surprisingly long time), the app complained about a save conflict:
In this particular case I knew exactly what data was where, because I was expecting a conflict. But normally I would not remember that, and I was surprised that I was not presented with a side-by-side comparison to enable me to choose what to keep.
Is this screen purely a product of the app? Or are there certain things built into an iCloud framework (iCloudKit?) that they have no control over?
In other words, is it possible to build an app that presents the users with the information they need to resolve document save conflicts? Or has Apple tied our hands, and do we just have to accept their sub-optimal syncing and sub-optimal resolution tools?
App developers do have a choice on how to handle conflicts, and could implement conflict resolution in a custom way, however the common path on MacOS is to use the standard dialog you see (which is part of NSPersistentDocument
).
Syncing will always be vulnerable to delay, even with good network connectivity, so developers are expected to cope with the consequences of delayed updates.