Learn all about Core Data with these posts

How to handle persistence using Core Data on your projects for Apple platforms.

New!
How to run Swift Data and Core Data operations in the background and share models across concurrency contexts

Core Data and Swift Data model objects can't be shared across different threads and doing so can result in data corruption and crashes. In this article, I will show you how to set up a fully thread-safe Core Data and Swift Data stack that performs all operations in the background.

Core Data staged migrations

As announced in WWDC23, and very similarly to the way you perform migrations across Swift Data models, you can now define Core Data migrations programmatically using an NSStagedMigrationManager instance.This method works by defining a series of migration steps (called stages) that describe how to migrate across different versions of your model.

Custom Core Data migrations

A step-by-step guide on how to perform complex Core Data migrations using mapping models and custom migration policies.

Migrating a Core Data store to an App Group shared container

How to make an existing Core Data store accessible to widgets without losing any existing data.

Using Core Data and Swift Data side by side

How to set up Core Data and Swift Data to use the same data store in your app.