---
title: Creating a Core Data model
framework: coredata
role: article
role_heading: Article
path: coredata/creating-a-core-data-model
---

# Creating a Core Data model

Define your app’s object structure with a data model file.

## Overview

Overview The first step in working with Core Data is to create a data model file to define the structure of your app’s objects, including their object types, properties, and relationships. You can add a Core Data model file to your Xcode project when you create the project, or you can add it to an existing project. Add Core Data to a New Xcode Project In the dialog for creating a new project, select the Use Core Data checkbox, and click Next.

The resulting project includes an .xcdatamodeld file.

Add a Core Data Model to an Existing Project Choose File > New > File and select the iOS platform tab. Scroll down to the Core Data section, select Data Model, and click Next.

Name your model file, select its group and targets, and click Create.

Xcode adds an .xcdatamodeld file with the specified name to your project.

## See Also

### Related Documentation

- [Configuring Attributes](coredata/configuring-attributes.md)
- [Configuring Relationships](coredata/configuring-relationships.md)
- [Generating code](coredata/generating-code.md)

### Essentials

- [Setting up a Core Data stack](coredata/setting-up-a-core-data-stack.md)
- [Core Data stack](coredata/core-data-stack.md)
- [Handling Different Data Types in Core Data](coredata/handling-different-data-types-in-core-data.md)
- [Linking Data Between Two Core Data Stores](coredata/linking-data-between-two-core-data-stores.md)
