Designing Data Structure

You may have noticed that a new file, MyContactList_CoreData.xcdatamodeld, has been added to the project. This is a representation of the Data Model and is where you can design the data structure for the MyContactList app. The data structure for the app is very simple with just a single entity. For the following steps, refer to Figure 11.6.

Image

Figure 11.6 Using the Core Data Model editor.

1. Open the data model file.

2. Click Add Entity and name the entity Contact (entity names must begin with as uppercase letter) by double-clicking the word Entity and typing Contact.

3. Click Add Attribute and name the first attribute ...

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android 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.