15

I am releasing a Core Data based app and wondered what I need to consider if, in an update later down the line, I need to change the model.

How do I move existing user data on the device from the old data model into a new updated model?

Thanks

TechZen
  • 64,370
  • 15
  • 118
  • 145
Chris
  • 366
  • 3
  • 9

1 Answers1

14

Generally, you'll have to consider nothing now but as soon as you change your data model, you'll have to employ Core Data's model migration tools. Read the Core Data Model Versioning and Data Migration Programming Guide.

Peter
  • 773
  • 1
  • 7
  • 23
Ole Begemann
  • 135,006
  • 31
  • 278
  • 256
  • When you say you don't have to consider nothing, are you saying that if the Core Data Model doesn't change, but the user does update the App, all the information stored in Core Data will still be available? Thank you – nmdias Aug 16 '13 at 16:01
  • that is exactly correct nmidas. The only time you really need to consider anything is if you have changed the data model. If this remains unchanged and it is only your app coding that has changed the data will continue to be available as it was. – Peter Sep 22 '13 at 02:57