views:

82

answers:

1

How would you update a CoreData store with a new/updated data model?

+2  A: 

Use a data migration:

During migration, Core Data creates two stacks, one for the source store and one for the destination store. Core Data then fetches objects from the source stack and inserts the appropriate corresponding objects into the destination stack. Note that Core Data must re-create objects in the new stack.

gerry3
Does the same apply to the mac?
nanochrome
Yes. Core Data is the same on the iPhone and the Mac with the exception that the iPhone does not currently support Cocoa-bindings.
gerry3
Yes. Core Data is nearly identical between the two platforms.
Marcus S. Zarra