Skip to main content

Posts

Showing posts from November, 2013

Fixed : App crash on update with core data changes

Why migration required ? When the model does not match the store, a migration is required. In order to perform a migration, Core Data (technically, an instance of NSMigrationManager) requires these things: The destination managed object model (the one with the changes) A managed object model that can open the existing store The ability to infer mapping between the two models (for a lightweight migration), or a manual mapping model Permission to attempt to perform an automatic migration (for a lightweight migration) It is therefore absolutely essential that you never make changes to the managed object model for a released version of an app. That is, if your app is already in the App Store,  don’t change a single thing in that version of the managed object model . Solution for the Crash while update an application from the app store: Create a  new version  of the managed object model! This reminds me to mention some other best practices to adopt when working with Core D