O'Reilly logo

Core Data in Swift by Marcus S. Zarra

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

Working with NSManagedObject Instances

The NSManagedObject is the object we work with the most in a Core Data application. Each instance of the NSManagedObject represents one entity in our Core Data repository. By combining Core Data with KVO (Key Value Observing) and KVC (Key Value Coding), this one object can dynamically represent any object that we need and that can be defined in our data model. KVO and KVC are discussed in detail in Chapter 11, Bindings, KVC, and KVO. To learn more about them, I highly recommend you read Apple’s excellent documentation on the subjects.[3]

The properties and relationships defined in our data model are available and are easy to access directly from the NSManagedObject. Without subclassing it, we can access ...

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