I noticed that Apple's offical app Notes does automatic merge of conflict editings.
For example, if I edit a note on my iPad while offline by addng a line of text while I saved a new version on my iPhone by adding another line of text. When iPad comes online, Notes automatically merges the two lines into a 'combined' new note.
But how does that work? I assume Apple is doing somekind of magic on UITextView's attributedString. Any clues or ideas?