Skip to Main Content
Core Data in Objective-C, 3rd Edition
book

Core Data in Objective-C, 3rd Edition

by Marcus S. Zarra
June 2016
Beginner to intermediate content levelBeginner to intermediate
240 pages
6h 17m
English
Pragmatic Bookshelf
Content preview from Core Data in Objective-C, 3rd Edition

Fundamentals of Core Data Versioning

We’ve seen the nuts and bolts, but what’s the magic behind all of this? How does the data migration actually work? As we already explored in Chapter 2, Under the Hood of Core Data, Core Data works with MOM (NSManagedObjectModel) objects that describe the data entities, their attributes, and their relationships. Core Data versioning works with those same MOM objects but takes the design one step further. Each entity version in each data model has a unique hash. When Core Data loads a persistent store from disk, it resolves the matching hashes in the persistent store against the MOM objects included with the application. If the matching MOM isn’t flagged as the “current” MOM, data migration kicks in.

How Data ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

iOS Programming Cookbook

iOS Programming Cookbook

Hossam Ghareeb
Learning Cocoa with Objective-C, 4th Edition

Learning Cocoa with Objective-C, 4th Edition

Paris Buttfield-Addison, Jonathon Manning, Tim Nugent

Publisher Resources

ISBN: 9781680502022Errata Page