Building the Xcode Example Project

To start this project, we’ll use the Core Data document-based application template from within Xcode. In a document-based application, each document object has its own Core Data stack, as opposed to a single Core Data stack for the entire application.

Once we’ve created the project, named CDPreferences, we need to create the data model. For this example, we’re going to focus only on the parameters and build the parameters table shown here. Each parameter has two properties: a name that’s a nonoptional string and a value that’s an optional string. By making the value optional, we can have parameters that are nullable.

With no additional code changes, our application will correctly start up and display an empty ...

Get Core Data in Objective-C, 3rd Edition 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.