Core Data Fundamentals

Welcome to Core Data Fundamentals

Welcome to Core Data Fundamentals. In this series, you'll learn the ins and outs of Apple's popular Core Data framework. Even though we'll be building an iOS application, the Core Data framework is available on iOS, tvOS, macOS, and watchOS, and the contents of this series apply to each of these platforms.

Xcode 9 and Swift 4

In this series, we use Xcode 9 and Swift 4. Xcode 8 and Swift 3 introduced a number of significant improvements that make working with Core Data more intuitive and more enjoyable. Make sure to have Xcode 8 or Xcode 9 installed to follow along. Everything you learn in this series applies to both Swift 3 and Swift 4.

What You'll Learn

Before we start writing code, we take a look at the Core Data framework itself. We find out what Core Data is and isn't, and we explore the heart of every Core Data application, the Core Data stack.

In this series, we build Notes, an iOS application that manages a list of notes. Notes is a simple iOS application, yet it contains all the ingredients we need to learn about the Core Data framework, from creating and deleting records to managing many-to-many relationships.

We also take a close look at the brains of a Core Data application, the data model. We discuss data model versioning and migrations. These concepts are essential to every Core Data application.

Core Data records are represented by managed objects. You learn how to create them, fetch them from a persistent store, and delete them if they're no longer needed.

Core Data Fundamentals also covers a few more advanced topics. Even though these topics are more advanced, they're important to know about if you work with Core Data. We talk in detail about the NSFetchedResultsController class and, at the end of this series, I introduce you to the brand new NSPersistentContainer class, a recent addition to the framework.

Last but not least, we take a deep dive into Core Data and concurrency, an often overlooked topic. This is another key topic for anyone working with Core Data. Don't skip this.

That's a lot to cover, but I'm here to guide you along the way.

Following Along

If you'd like to follow along, I recommend downloading the source files of each episode. The episodes that include code each have a starter project and a finished project. This makes it easy to follow along or pick a random episode of this series.

If you're new to Core Data, then I recommend watching every episode of the series. Over the years, I have taught thousands of developers about the Core Data framework. From that experience, I developed a roadmap for teaching Core Data. This series is the result of that roadmap.

Next Episode "What Is Core Data"

Stop Writing Swift That Sucks

Download the Swift Patterns I Swear By