---
title: Core Data
framework: Core Data
role: collection
role_heading: Framework
platforms: [iOS 3.0+, iPadOS 3.0+, Mac Catalyst 13.0+, macOS 10.4+, tvOS 9.0+, visionOS 1.0+, watchOS 2.0+]
path: coredata
---

# Core Data

Persist or cache data on a single device, or sync data to multiple devices with CloudKit.

## Overview

Overview Use Core Data to save your application’s permanent data for offline use, to cache temporary data, and to add undo functionality to your app on a single device. To sync data across multiple devices in a single iCloud account, Core Data automatically mirrors your schema to a CloudKit container. Through Core Data’s Data Model editor, you define your data’s types and relationships, and generate respective class definitions. Core Data can then manage object instances at runtime to provide the following features. Persistence Core Data abstracts the details of mapping your objects to a store, making it easy to save data from Swift and Objective-C without administering a database directly.

Undo and redo of individual and batched changes Core Data’s undo manager tracks changes and can roll them back individually, in groups, or all at once, making it easy to add undo and redo support to your app.

Background data tasks Perform potentially UI-blocking data tasks, like parsing JSON into objects, in the background. You can then cache or store the results to reduce server roundtrips.

View synchronization Core Data also helps keep your views and data synchronized by providing data sources for table and collection views. Versioning and migration Core Data includes mechanisms for versioning your data model and migrating user data as your app evolves.

## Topics

### Essentials

- [Creating a Core Data model](coredata/creating-a-core-data-model.md)
- [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)

### Data modeling

- [Modeling data](coredata/modeling-data.md)
- [Core Data model](coredata/core-data-model.md)

### Fetch requests

- [NSFetchRequest](coredata/nsfetchrequest.md)
- [NSAsynchronousFetchRequest](coredata/nsasynchronousfetchrequest.md)
- [NSAsynchronousFetchResult](coredata/nsasynchronousfetchresult.md)
- [NSFetchedResultsController](coredata/nsfetchedresultscontroller.md)

### SwiftData migration and coexistence

- [Adopting SwiftData for a Core Data app](coredata/adopting-swiftdata-for-a-core-data-app.md)

### CloudKit mirroring

- [Mirroring a Core Data store with CloudKit](coredata/mirroring-a-core-data-store-with-cloudkit.md)
- [Synchronizing a local store to the cloud](coredata/synchronizing-a-local-store-to-the-cloud.md)
- [NSPersistentCloudKitContainer](coredata/nspersistentcloudkitcontainer.md)
- [NSPersistentCloudKitContainerOptions](coredata/nspersistentcloudkitcontaineroptions.md)
- [Sharing Core Data objects between iCloud users](coredata/sharing-core-data-objects-between-icloud-users.md)

### Change processing

- [Accessing data when the store changes](coredata/accessing-data-when-the-store-changes.md)
- [Consuming relevant store changes](coredata/consuming-relevant-store-changes.md)
- [Persistent history](coredata/persistent-history.md)

### Background tasks

- [Using Core Data in the background](coredata/using-core-data-in-the-background.md)
- [Loading and displaying a large data feed](swiftui/loading-and-displaying-a-large-data-feed.md)
- [Conflict resolution](coredata/conflict-resolution.md)
- [Batch processing](coredata/batch-processing.md)

### Data model migration

- [Migrating your data model automatically](coredata/migrating-your-data-model-automatically.md)
- [Staged migrations](coredata/staged-migrations.md)
- [Manual migrations](coredata/manual-migrations.md)

### Related types

- [Core Data Constants](coredata/core-data-constants.md)
