{"id":18040,"date":"2015-03-18T08:38:55","date_gmt":"2015-03-18T03:08:55","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=18040"},"modified":"2016-01-26T09:23:04","modified_gmt":"2016-01-26T03:53:04","slug":"coredata-migration-versioning-of-coredata","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/","title":{"rendered":"CoreData Migration (Versioning of CoreData)"},"content":{"rendered":"<p><strong>What is Migration ?<\/strong><\/p>\n<p>Migration is a way of telling Xcode how to transition the data from the old model to the new model .<\/p>\n<p><strong>Why migration required ?<\/strong><\/p>\n<p>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:<\/p>\n<ul>\n<li>The destination managed object model (the one with the changes)<\/li>\n<li>A managed object model that can open the existing store<\/li>\n<li>The ability to infer mapping between the two models (for a lightweight migration), or a manual mapping model<\/li>\n<li>Permission to attempt to perform an automatic migration (for a lightweight migration)<\/li>\n<\/ul>\n<p><\/b><\/p>\n<p>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, <strong>don\u2019t change a single thing in that version of the managed object model<\/strong>.<\/p>\n<p><strong>Solution for the Crash while update an application from the app store:<\/strong><\/p>\n<p>Create a new version of the managed object model! This reminds me to mention some other best practices to adopt when working with Core Data:<\/p>\n<ul>\n<li>Create a new model version for every release version of an app<\/li>\n<li>Keep a copy of every release version of an app (you\u2019re already doing this, right?)<\/li>\n<li>Keep a copy of every release version backing SQLite store containing suitable test data<\/li>\n<\/ul>\n<p><\/b><\/p>\n<p><strong>Migrations can handle the following changes:<\/strong><\/p>\n<ul>\n<li>Adding or removing an entity, attribute, or relationship<\/li>\n<li>Making an attribute non-optional with a default value<\/li>\n<li>Making a non-optional attribute optional<\/li>\n<li>Renaming an entity or attribute using a renaming identifier<\/li>\n<\/ul>\n<p><\/b><\/p>\n<p><strong>Getting Started:<\/strong><\/p>\n<ul>\n<li>Create a new version of the managed object model  &#8211;  select .xcdatamodeld file in Xcode and then from the menu select <strong>Editor\\Add Model Version<\/strong> <\/li>\n<p><\/b><br \/>\n<\/b><\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.10.59-PM.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.10.59-PM.png\" alt=\"Screen Shot 2015-03-15 at 9.10.59 PM\" width=\"1280\" height=\"800\" class=\"alignnone size-full\" \/><br \/>\n<\/b><br \/>\n<\/b><\/p>\n<li>Set version name and select model based on which you want to create new model.<\/li>\n<li>Switch to latest version of model \u2013 select  .xcdatamodeld file from Project Navigator and go to FILe Inspector and select latest core data model<\/li>\n<p><\/b><br \/>\n<\/b><\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.11.54-PM.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.11.54-PM.png\" alt=\"Screen Shot 2015-03-15 at 9.11.54 PM\" width=\"1280\" height=\"800\" class=\"alignnone size-full\" \/><br \/>\n<\/b><br \/>\n<\/b><\/p>\n<li>Now you will see a little green circle with white checkmark badge on latest .xcdatamodel in the Project Navigator.<\/li>\n<p><\/b><br \/>\n<\/b><\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.12.01-PM.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.12.01-PM.png\" alt=\"Screen Shot 2015-03-15 at 9.12.01 PM\" width=\"1280\" height=\"800\" class=\"alignnone size-full\" \/><br \/>\n<\/b><br \/>\n<\/b><\/p>\n<li>Add permissions to attempt to perform an automatic migration<\/li>\n<\/ul>\n<p><\/b><\/p>\n<p>Open .m file containing core data related code and add the following code immediately after<br \/>\n<code>persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];<\/code><br \/>\n<\/b><br \/>\n<\/b><\/p>\n<p>[code language=&#8221;objc&#8221;]<br \/>\nNSDictionary *options = @{<br \/>\nNSMigratePersistentStoresAutomaticallyOption : @YES,<br \/>\nNSInferMappingModelAutomaticallyOption : @YES<br \/>\n};<br \/>\n[\/code]<br \/>\n<\/b><br \/>\n<\/b><\/p>\n<p>Change the next line to pass the <strong>options<\/strong> dictionary you just created to<br \/>\n<code>addPersistentStoreWithType:configuration:URL:options:error:<\/code><br \/>\n<\/b><br \/>\n<\/b><\/p>\n<p>[code language=&#8221;objc&#8221;]<br \/>\nif (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType<br \/>\n         configuration:nil<br \/>\n         URL:storeURL options:options error:&amp;error]) {<br \/>\n[\/code]<br \/>\n<\/b><br \/>\n<\/b><\/p>\n<ul>\n<li>Now make changes to  an core data entity, attribute, or relationship whatever you want<\/li>\n<li>Delete CoreData NSManagedObect Subclass for entities in which you have made changes and create new file  (<strong>New File\/ CoreData\/  NSManagedObect<\/strong>)<\/li>\n<p><\/b><br \/>\n<\/b><\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.14.32-PM.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.14.32-PM.png\" alt=\"Screen Shot 2015-03-15 at 9.14.32 PM\" width=\"1280\" height=\"800\" class=\"alignnone size-full\" \/><br \/>\n<\/b><br \/>\n<\/b><\/p>\n<li>Select latest Data Model and click Next<\/li>\n<p><\/b><br \/>\n<\/b><\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.15.30-PM.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.15.30-PM.png\" alt=\"Screen Shot 2015-03-15 at 9.15.30 PM\" width=\"1280\" height=\"800\" class=\"alignnone size-full\" \/><br \/>\n<\/b><br \/>\n<\/b><\/p>\n<li>Select entities in which you have made changes and click next <\/li>\n<\/ul>\n<p><\/b><br \/>\n<\/b><\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.15.39-PM.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.15.39-PM.png\" alt=\"Screen Shot 2015-03-15 at 9.15.39 PM\" width=\"1280\" height=\"800\" class=\"alignnone size-full\" \/><br \/>\n<\/b><br \/>\n<\/b><\/p>\n<p>Run your app and check out its working fine. Congratulations! You just successfully performed a  Core Data migration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Migration ? Migration is a way of telling Xcode how to transition the data from the old model to the new model . 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 [&hellip;]<\/p>\n","protected":false},"author":172,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":166,"footnotes":""},"categories":[1400,1772,1],"tags":[3011,3014,3015,1703,3016,3013,3012],"class_list":["post-18040","post","type-post","status-publish","format-standard","hentry","category-ios","category-mobility","category-technology","tag-coredata","tag-coredata-migration","tag-coredata-versioning","tag-migration","tag-update-database-version","tag-version","tag-versioning"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"What is Migration ? Migration is a way of telling Xcode how to transition the data from the old model to the new model . 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\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Ashu Baweja\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"CoreData Migration (Versioning of CoreData) | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"What is Migration ? Migration is a way of telling Xcode how to transition the data from the old model to the new model . 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\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"CoreData Migration (Versioning of CoreData) | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"What is Migration ? Migration is a way of telling Xcode how to transition the data from the old model to the new model . 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\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/#article\",\"name\":\"CoreData Migration (Versioning of CoreData) | TO THE NEW Blog\",\"headline\":\"CoreData Migration (Versioning of CoreData)\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/ashu-bawejaintelligrape-com\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2015\\\/03\\\/Screen-Shot-2015-03-15-at-9.10.59-PM.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/#articleImage\"},\"datePublished\":\"2015-03-18T08:38:55+05:30\",\"dateModified\":\"2016-01-26T09:23:04+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/#webpage\"},\"articleSection\":\"iOS, Mobility, Technology, coredata, coredata migration, coredata versioning, migration, update database version, version, versioning\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/#listItem\",\"name\":\"CoreData Migration (Versioning of CoreData)\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/#listItem\",\"position\":3,\"name\":\"CoreData Migration (Versioning of CoreData)\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/ashu-bawejaintelligrape-com\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/ashu-bawejaintelligrape-com\\\/\",\"name\":\"Ashu Baweja\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d1e832c32f554b88da3e8f8fd33424aa41115be6faff0b06e6a94ebc2c2d0cba?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Ashu Baweja\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/\",\"name\":\"CoreData Migration (Versioning of CoreData) | TO THE NEW Blog\",\"description\":\"What is Migration ? Migration is a way of telling Xcode how to transition the data from the old model to the new model . 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\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/coredata-migration-versioning-of-coredata\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/ashu-bawejaintelligrape-com\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/ashu-bawejaintelligrape-com\\\/#author\"},\"datePublished\":\"2015-03-18T08:38:55+05:30\",\"dateModified\":\"2016-01-26T09:23:04+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"CoreData Migration (Versioning of CoreData) | TO THE NEW Blog","description":"What is Migration ? Migration is a way of telling Xcode how to transition the data from the old model to the new model . 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","canonical_url":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/#article","name":"CoreData Migration (Versioning of CoreData) | TO THE NEW Blog","headline":"CoreData Migration (Versioning of CoreData)","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/ashu-bawejaintelligrape-com\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2015\/03\/Screen-Shot-2015-03-15-at-9.10.59-PM.png","@id":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/#articleImage"},"datePublished":"2015-03-18T08:38:55+05:30","dateModified":"2016-01-26T09:23:04+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/#webpage"},"articleSection":"iOS, Mobility, Technology, coredata, coredata migration, coredata versioning, migration, update database version, version, versioning"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/tothenewco.pro\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/#listItem","name":"CoreData Migration (Versioning of CoreData)"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/#listItem","position":3,"name":"CoreData Migration (Versioning of CoreData)","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/ashu-bawejaintelligrape-com\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/ashu-bawejaintelligrape-com\/","name":"Ashu Baweja","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d1e832c32f554b88da3e8f8fd33424aa41115be6faff0b06e6a94ebc2c2d0cba?s=96&d=mm&r=g","width":96,"height":96,"caption":"Ashu Baweja"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/","name":"CoreData Migration (Versioning of CoreData) | TO THE NEW Blog","description":"What is Migration ? Migration is a way of telling Xcode how to transition the data from the old model to the new model . 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","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/ashu-bawejaintelligrape-com\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/ashu-bawejaintelligrape-com\/#author"},"datePublished":"2015-03-18T08:38:55+05:30","dateModified":"2016-01-26T09:23:04+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"CoreData Migration (Versioning of CoreData) | TO THE NEW Blog","og:description":"What is Migration ? Migration is a way of telling Xcode how to transition the data from the old model to the new model . 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","og:url":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"CoreData Migration (Versioning of CoreData) | TO THE NEW Blog","twitter:description":"What is Migration ? Migration is a way of telling Xcode how to transition the data from the old model to the new model . 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","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"18040","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 15:26:23","updated":"2024-02-29 09:17:06","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCoreData Migration (Versioning of CoreData)\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Technology","link":"https:\/\/tothenewco.pro\/blog\/category\/technology\/"},{"label":"CoreData Migration (Versioning of CoreData)","link":"https:\/\/tothenewco.pro\/blog\/coredata-migration-versioning-of-coredata\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/18040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/172"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=18040"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/18040\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=18040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=18040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=18040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}