Chapter    2

Core Data: What, Why, and How

Core Data is a framework and set of tools that allow you to save (or persist) your application’s data to an iOS device’s file system automatically. Core Data is an implementation of something called object-relational mapping (ORM). This is just a fancy way of saying that Core Data allows you to interact with your Swift objects without having to worry about how the data from those objects is stored and retrieved from persistent data stores such as relational databases (such as SQLite) or flat files.

Core Data can seem like magic when you first start using it. Core Data objects are, for the most part, handled just like plain old objects, and they seem to know how to retrieve and save themselves automagically. ...

Get More iPhone Development with Swift: Exploring the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.