Important: This document describes behavior on old releases of OS X and no longer represents best practices for OS X v10.8 and later or iOS 6 and later.
Creating the Project
This part of the tutorial guides you through creating the CDCLI project.
Create a New Project
Core Data is integrated into the Cocoa (and Cocoa Touch) framework, so any Cocoa or Foundation application can use it. The CDCLI program you’ll build is Foundation Tool that uses Core Data.
Create the project
Follow these steps to create the initial project:
Create a project with these characteristics:
Platform: OS X
Template family: Application
Template name: Command Line Tool
Use Automatic Reference Counting
The name of the project is not important.
Link the Core Data framework
Add the Core Data framework to the project’s target. (A Foundation tool does not automatically link against the Core Data framework, which is why you need to add it.)
Add an import statement to the main source file:
You created a very simple Foundation Tool project and added the Core Data framework. This emphasizes that there’s no need to use a graphical user interface using the Application Kit or UIKit. It is not even necessary to use the Xcode data modeling tool—in the next chapter you will create the model entirely in code. Using the modeling tool does, however, saves you a lot of time and effort.