TommyTheCat
TommyTheCat

Reputation: 41

What happens to saved data in Core Data on app update


the headline just about sums up my question: What happens to previously saved data in Core Data when I ship a new version of my app?
From what I understand, migration only matters for changes in the data model - still I want to be sure before I start building... Would be pretty awkward, if all the data was gone once the customer loads the shiny new version, wouldn't it?
Just to be sure...
Please forgive my ignorance; I couldn't find anything in the docs or the web.

Upvotes: 1

Views: 105

Answers (2)

chewy
chewy

Reputation: 8267

All data is keet as it is, assuming you do not change the bundle name / Application Identifier.

You can see it on the simulator as it keeps the data just like on the device itself.

Upvotes: 3

Mathieu Hausherr
Mathieu Hausherr

Reputation: 3485

If you use a persistent SQLite store, the new app reload data from the sqlite file. You have a persistent SQLite store if you wrote a line like this

NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"YourProject.sqlite"];

Upvotes: 0

Related Questions