O'Reilly logo

Learning Core Data for iOS with Swift: A Hands-On Guide to Building Core Data Applications, Second Edition by Tim Roadley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3. Managed Object Model Migration

Anyone who has never made a mistake has never tried anything new.

Albert Einstein

In Chapter 2, “Managed Object Model Basics,” the fundamentals of managed object models were introduced, yet you were constrained to just one entity and a few attributes. The next logical step is to add to the model; however, this requires a number of preliminary steps to prevent errors caused by these changes. This chapter shows how to add model versions and model mappings, and it demonstrates different migration techniques you can choose when upgrading a model.

Changing a Managed Object Model

As an application evolves, its managed object model probably needs to change, too. Simple changes, such as attribute defaults, validation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required