Situation:
We are multiple developers working on the same product.
We have version 1.0 of our core data model which is currently on the app store.
I am working on features for 1.1, and require creating a new "version" of the data model that I name "1.1"
My other developer is working on features for 2.0 of the app, which is a year away. He requires making changes to core data as well, so he creates a new "version" based on 1.0 that he names "2.0"
I modify some of the entities in 1.1 (Let's say that I add two properties to my "Cats" entity) and we ship the app to the app store.
Now he wants to make sure that any of those changes made in 1.1 are "merged" into his 2.0 model. (ie. his 2.0 model should now have the updated "cats" entity) How can we achieve this without having to take note of every single change we make, and manually add them/modify them in the 2.0 version?
From what I understand, creating a new "version" in core data does a "deep copy" of the version file (instead of referencing it and making changes)
Thanks!
In fact, i think that there is no absolutely automatic way of achieving this, but what you can do is to use the Core Data migration tools.
For example, creating a mapping model from 2.0 to 1.1 will let your developer see, what has changed and how, so he would be able to easily added the changed needed.
In fact, you'll definitely to use the mapping model in future, to make your newer version work with the data from the previous one, so it would be useful to look in that direction.
You can read more about Core Data mapping here.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With