Search code examples
iphonecore-dataapp-storeupgradecore-data-migration

iPhone app's Core Data, after upgrade to App Store?


I managed to finish upload my first iPhone app to Apple's App Store couple of days ago. My app is based on Core Data so it contains users' data to their devices.

What I want to know is that what happens when I upgrade the app with or without altering Core Data? (altering means add new entity or property, etc)

From my experience, I downloaded my own app from Apple's App Store and saved some data and then I install the same app from my computer using XCode with slight change to interface that has nothing to do with Core Data. When I turned on the app, the data is all there.

Is it safe to upload an upgraded version of iPhone's app to Apple's App Store assuming that as long as we don't touch Core Data, user's data would not be influenced?


Solution

  • If you change Core Data model, it may need to migrate/update its scheme. Apple has the appropriate documentation. The work necessary to perform a migration depends on what you change.