Using Core Data With SwiftUI – An Introduction

This sample code project is associated with the following guides at andrewcbancroft.com:

Overview

How does Apple intend for us to use Core Data with SwiftUI?

This project demonstrates how to stitch things together.

It’s a single-view app that can

  • Persist a list of BlogIdeas to a Core Data persistent store
  • Use the new @FetchRequest property wrapper to fetch BlogIdeas
  • Use the @Environment‘s managedObjectContext to create, update, and delete BlogIdeas

Within the code,

❇️
Alerts you to Core Data pieces

ℹ️
Alerts you to general info about what my brain was thinking when I wrote the code

GitHub

https://github.com/andrewcbancroft/BlogIdeaList-SwiftUI