What happens when 2 clients modify the same iCloud synced Note? Does the Notes app handle sync concurrency issues gracefully, or does it only decide to keep one version of a note if 2 clients modify the same note?

For example:


Turn on airplane-mode on an iPad
Modify a note on the iPad
Turn on airplane-mode on an iPhone
Modify the same note on the iPhone
Turn off airplane-mode on both devices


Which version of the note is retained? Or does it store data from both modifications?
An iCloud-synced document is implemented with the NSDocument class. The full guide to this class including details on conflict resolution is the Document-Based App Programming Guide for Mac. Briefly, conflict resolution is attempted automatically. If the most recent document is not clear (the most recent, based on modification date is favoured) then the Versions user interface is involved and the user must select the correct document to resolve the conflict.