O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

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

Adding Core Data Boilerplate Code

Before you can use any data, you have to initialize Core Data for the app. You need objects for each of the three classes shown in Figure 9-1. When you become more familiar with Core Data, this is something you will probably do in your own helper class, as described in Chapter 1 of Learning Core Data for iOS: A Hands-on Guide to Building Core Data Applications by Tim Roadley. If you know your app will use Core Data before you create the project, some of the application creation templates provided by Xcode have a check box to use Core Data.

In this chapter, you use code based on the Master–Detail Application template from Xcode. The only modifications are adding an import of CoreData.h and two #defines for the ...

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