Core Data: Fundamentals

Jul 19 2022 · Swift 5.5, iOS 15.4, Xcode 13.3.1

Part 1: The Core Data Stack

01. Introduction

Episode complete

Play next episode

Next
About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Next episode: 02. The Core Data Stack
Transcript: 01. Introduction

Hey there! I’m Josh and welcome to Core Data: Fundamentals. In this course you’re going to learn how to store data on an iOS device using the Core Data framework!

Core Data is an extremely powerful framework that abstracts much of the details of how and where the data is actually stored. This allows you to focus on what you want to save. You can use the framework to:

  • store data permanently for offline use
  • to cache temporary data or
  • provide functionality like undo and redo for your apps.

In this course you’re going to learn how to use Core Data by building an app that lets you track rocket launches. Users will enter data for those launches either manually or from a URL. The starter project contains the user interface for this app so that you can focus on learning how to save data.

You’re going to learn how to work with Core Data using SwiftUI. Recent additions to the SwiftUI framework have introduced helpful features that allow your Core Data database and your SwiftUI views to work hand in hand. These eliminate a lot of the previous work you had to do to keep the views up to date.

You’ll start with a high level overview of Core Data and all its moving parts. Despite being relatively simple to use for projects like this, Core Data delegates specific responsibility to individual objects, and by understanding what each object does you’ll have a better sense of how it all comes together.

In the second part of the course you’ll learn how to create Core Data models and represent them in code. Similar to apps such as the Reminders app, you can create new entries that persist even after you switch apps and even if you turn off the device.

You’ll learn how to persist instances of a core data model, so that later on you can fetch all instances from the core data store to display. You’ll do this in a later course, and also learn other tips and tricks such as how to update and delete launches.

Before you dive into all this, let’s make sure we’re on the same page! To take this course you should have a good grasp of iOS fundamentals and the Swift programming language.

If what I said sounds unfamiliar to you, make sure you check out the “Your First iOS and SwiftUI App” course. You should also have experience working with representing data in a list using the List type in SwiftUI.

Your subscriptions contains that course and more, so take advantage!

This course will build on your knowledge of Swift and general iOS development.

I can’t get started without recognizing 2 important people. Pasan Premaratne wrote the last version of this course and was the basis for this latest update. Also, a major shout out to Gina de la Rosa, who is the technical editor for this course. Please give them both a follow on twitter - and while you’re there follow me at @hococoder.

With those shout outs complete, let’s get started!