I'm having trouble understanding what my options are to merge 2 or more conflicted versions of a UIDocument
stored in iCloud. After detecting the document conflict, I currently use removeOtherVersionsOfItemAtURL
to simply keep the latest version of the document's data. However, I would like to support merging conflicted documents.
The only resources and tutorials I found referred to Core Data and persistent stores for merging, and the examples used things like SQLite
, which I don't use. In my case, each document is a separate file.
Background: My app uses custom NSObject
subclasses (with relevant of properties) to store data. They are encoded and decoded (using NSCoding
+ NSKeyedArchiver/NSKeyedUnarchiver
) inside of a UIDocument
. I have set up my app to fully work with iCloud. It can make files ubiquitous and vice-versa, edit and delete them.
Please help me to understand what I can do regarding merging conflicted UIDocument's
!