Updating core data data model

Based on what you’ve learned so far, see if you can figure out how to do this on your own!

updating core data data model-72

This segue is used to connect a table cell and the detail view controller.

When user selects any device in the table view, the detail view controller will be displayed to show the information of the selected device. If you try to edit the information of an existing device, it will not update the device information properly.

It will attempt to perform a migration from whatever the current version is on a user’s device to the newest version available when the user selects to install the latest update in the App Store. Then you create a 3rd version of the app/model and release it to the App Store.

For example, let’s say you have an app in the App Store and you have already released a second version of the app with changes to the model. Your existing users may have the 1st or 2nd version of your app on their device.

Core Data will attempt to migrate from whatever version the user currently has on their device directly to version 3 of your app/model, e.g., from version 1 to 3, or from version 2 to 3.