Core Data: Fundamentals

Learn the basics of Core Data in this beginner series. You’ll learn how to model your data with attributes and relationships, save data using a context, display saved data in lists and much more, in both SwiftUI and UIKit! By Josh Steele.

5 (4) · 2 Reviews

Download materials
Save for later
Comments
Share

Learning path

This is part of the iOS Data & Networking learning path. View path.

Who is this for?

Beginners with just a little bit of iOS and Swift experience. This course isn’t suited for intermediate or advanced developers. If that’s you, check out our intermediate or advanced video courses for more ways to level-up your developer skills!

Covered concepts

  • Managed object models
  • Managed object contexts
  • Fetch requests and fetch results
  • Sorting data with sort descriptors
  • Filtering data with predicates
  • Using fetched results controllers to handle data changes
  • Storing large files as external data

Part 1: The Core Data Stack

01
Toggle description

What is Core Data? Find out how it is used to store data in your apps.

Toggle description

Take a high level tour of the Core Data stack and understand what Core Data is and isn’t.

Toggle description

Understand how Core Data represents an app’s data model using managed objects

Toggle description

Core Data needs to keep track of changes to the managed object model and it does this using a managed object context. Get a high level understanding of how a context is used in this episode.

Toggle description

Understand how the persistent store coordinator facilitates communication between the context and underlying data store.

Toggle description

Create a Core Data stack for use in the RocketLaunches app!

Conclusion 1:44
Toggle description

Wrap up this section by reviewing what you’ve learned about the Core Data stack, and find out what’s coming up in the next section.

Part 2: Saving Launches

Toggle description

In this episode, you’ll get a look at this part of the course, which covers how to create a data model and save data to the store.

Toggle description

Learn what an Entity is in the Core Data framework and how you can add attributes to model your data.

In this challenge complete the RocketLaunch entity by adding attributes to define your data model.

Toggle description

Understand what managed object subclasses are and how you can use them in code to represent your Core Data model.

Toggle description

Now that you have a RocketLaunch class you can use learn how to populate it and save data to the persistent store.

Conclusion 1:47
Toggle description

Wrap up this course by reviewing what you’ve learned about the core data stack, creating data models and persisting entities. Also find out where to go next!

Up next

iOS & Swift
Core Data: Beyond the Basics
In this course, you’ll learn about how to fetch, sort and filter entries from a Core Data persistent store. You’ll also dive into some more advanced topics such as delete rules and Core Data with Swift Concurrency.

Instructors

Contributors

Josh Steele

Instructor

Gina De La Rosa

Tech Editor

Adriana Kutenko

Illustrator

Nicolai Martelle Manaloto

Video Editor

Over 300 content creators. Join our team.