Reputation: 582
I have an iPhone app up on the store which uses core data. Now, every time I change something in my code with relation to core data, namely my managedobjectmodel or my model classes, I have to wipe all my data since I get a persistent store error.
Now I'm finding i need to make changes to my app and I don't want my users to lose all their data. What do I do? This is my first foray into Core Data so any help is appreciated. Thanks.
Upvotes: 0
Views: 156
Reputation: 582
Never mind. It's versioning and migration that I need to look into, no bother.
Upvotes: 0
Reputation: 21460
You need to version your data model. Check out Xcode > Design > Data Model. Then you need to migrate the data to the new model. This can get complicated depending on the changes.
Try this documentation.
Upvotes: 3