small medium large xlarge

Back to: All Forums  Core Data
N657160017_3588_pragsmall
18 Aug 2009, 19:44
Alvise Susmel (9 posts)

Hi,

I’ m reading the book and I’m asking what is the best way to sync (merge) two different xml representing the same Entity. I mean, if my app is in two different devices like a iphone and a mac, and the iphone send his xml file to the mac, is there a CoreData magic to merge of the two xml ?

Thanks. Alvise

Avatarsmall_pragsmall
25 Aug 2009, 16:30
Marcus S. Zarra (284 posts)

No, that would require a manual merging by you. You might be able to add a “last modified” attribute to the objects to help with merge decisions.

N657160017_3588_pragsmall
07 Sep 2009, 18:22
Alvise Susmel (9 posts)

Thank you for your answer! After the sync, I send back the final .db file to the iPhone and iPhone Core Data will need to reload it. I have to reload all the application or I can reload on the persistent store with the context ? Thanks

Avatarsmall_pragsmall
13 Sep 2009, 04:28
Marcus S. Zarra (284 posts)

There is no way to swap out the file from under Core Data. In the design you described you will need to tear down the Core Data stack and build it back up.

You must be logged in to comment