Creating a data model 

The data model is where you create your app's model objects and their properties. For our project, we only need to create one model object, called Review. Let's create a managed object model now:

  1. In the Navigator panel, right-click on the Misc folder and create a new group, called Core Data.
  2. Next, right-click this new Core Data folder and click New File.
  3. Inside the Choose a template for your new file screen, select iOS at the top and then scroll down to the Core Data section. From there, select Data Model. Then, hit Next:
  1. Name the file LetsEatModel and click Create.
  2. Click Add Entity in the screen that appears:

Get iOS 12 Programming for Beginners - Third Edition 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.