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 Common 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 and select Data Model. Then, hit Next:
    Creating a data model
  4. Name the file LetsEatModel and click Create.
  5. Click Add Entity in the screen that appears:
  6. Then, in the new screen, ...

Get iOS 10 Programming for Beginners 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.