1

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:

enter image description here

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?

4
  • This screen is from the system document handler. I believe (but may be wrong) you can double click the icons to see bigger previews. If you didn't know which one you wanted, you'd click to keep both and sort it out from there.
    – Ezekiel
    Commented Sep 24, 2021 at 19:12
  • @Ezekiel: you're right that you can open Quicklook (maybe through double-clicking—I don't remember) but Quicklook didn't help me in this case. It didn't display the contents.
    – iconoclast
    Commented Sep 27, 2021 at 21:47
  • @fsb: of course syncing is not instantaneous. But a good user experience would require it to not be heavily delayed either. However, I'm not suggesting that the developer is at fault. I noted that this is Apple's fault.
    – iconoclast
    Commented Sep 27, 2021 at 21:50
  • @fsb: did you decide to delete your comment and just downvote out of spite?
    – iconoclast
    Commented Sep 29, 2021 at 4:04

1 Answer 1

4

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.

6
  • "Syncing will always be vulnerable to delay" because iCloud will always be slow in how it handles synchronization? Or are you suggesting that it's literally impossible to make synchronization fast, quite apart from whatever limitations iCloud forces on us?
    – iconoclast
    Commented Jun 29, 2023 at 21:50
  • Apps are able to detect an iCloud file is out of date and request an updated copy. However the delay of notification of changes and the delay of an updated copy appearing are outside the control of the developer. So with good connectivity, notifications and updates can occur quite quickly (a couple of seconds in my experience).
    – MichaelR
    Commented Jun 30, 2023 at 1:10
  • It's called NSDocumentRevisionsController and gets created by NSDocument _handleConflictsForDocument:. I find it unbelievable there is no equivalent for UIDocument so iOS users in 3rd party apps will just unwillingly keep working on conflicted documents. Pages/Shortcuts on iOS have custom implementations.
    – malhal
    Commented Jul 1, 2023 at 17:09
  • Hi @malhal, yes the implementations are different but the mechanisms to be notified of and handle conflicts do exist in iOS. NSFilePresenter for notification, and NSFileVersion for conflict status and versions.
    – MichaelR
    Commented Jul 1, 2023 at 23:10
  • Do you know of any open source conflict resolution UI for iOS?
    – malhal
    Commented Jul 2, 2023 at 1:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .