CoreData in SwiftUI

An introduction to the Apple’s persistence framework

Alessandro Manilii
11 min readMay 22, 2023
Photo by panumas nikhomkhai: https://www.pexels.com/it-it/foto/foto-ravvicinata-dell-impianto-minerario-1148820/

One of the key fatures of an app is the one the will enable users to store data permanently. There are many ways to do that but, for large sets, CoreData is the best solution. The only drawback is that CoreData has a quite steep learning curve. In todays article I will show you how to use this amazing Apple’s Framework.

Please note that you can find the final project in my Patreon page:

If you like my articles, think about supporting me 👍

In today’s story we will follow the next steps:

  • The Idea
  • The Basic Persistence Stack
  • Prepare the Manager for Previews
  • Building the UI
  • Updating the Manager

Let’s start our journey.

The Idea

I will build a simple and classic To Do app where a user can insert a task to complete, can check it once completed and can eventually delete it. Nothing…

--

--

Alessandro Manilii

I’m an Italian professional iOS Developer, iOS Tech Lead at Wakala — Join Medium from the following link: https://medium.com/@alessandromanilii/membership