You want to visually design the data model of your iOS application using Xcode.
Follow the instructions in this chapter’s Introduction to create a Core Data project. Then find the file with the extension of xcdatamodel in your application bundle in Xcode and click it to open the visual data editor, as shown in Figure 18-2.
Figure 18-2. Visual data editor in Xcode
Xcode’s visual data editor is a fantastic tool that allows programmers to design the data model of their applications with ease. There are two important definitions you need to learn before you can work with this tool:
Corresponds to a table in a database
Corresponds to a column in a table
Entities will later become objects (managed objects) when we generate the code based on our object model. This is explained in Recipe 18.2. For now, in this recipe, we will concentrate on creating the data model in this tool.
In the editor, find the + button at the bottom. Click and hold on this button and then select Add Entity from the menu that will appear, as shown in Figure 18-3.
Your new entity will be created and will be in a state where you can immediately rename
it after creation. Change the name of this entity to
Person, as shown in
Figure 18-3. Adding ...