Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

2. Core Data > Setting Up Core Data in Xcode

Setting Up Core Data in Xcode

There are a few different ways to get started using Core Data in Xcode. If you want, you can actually use Xcode to generate all of the relevant object models, persistent stores, store coordinators, and managed object contexts. By clicking the Use Core Data check box in the new project creation dialog, Xcode automatically imports the Core Data framework to your project and adds creation and management methods of the Core Data stack to your app delegate (Figure 2.4).

Image

Figure 2.4. Automatically include Core Data frameworks in Xcode.

If you don’t want to use the autogenerated methods created by Xcode, however, you can of course do it yourself. But before you can use Core Data, you have to create your own Core Data stack, which involves the following steps:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial