Core Data In SwiftUI | SwiftUI Core Data Tutorial
tundsdev tundsdev
76.2K subscribers
21,016 views
0

 Published On Jan 1, 2023

Core Data In SwiftUI | SwiftUI Core Data Tutorial

🚨Improvement🚨
In the vid you'll see in the ContactsProvider.swift file I create a new context using the background context function. Can you replace these lines with the following below to create a new context on the main thread for better thread safety.

var newContext: NSManagedObjectContext {
let context = NSManagedObjectContext(concurrencyType: .mainQueueConcurrencyType)
context.persistentStoreCoordinator = persistentContainer.persistentStoreCoordinator
return context
}

**********************************

Timestamps:

00:00:00 - Intro/Preview
00:01:15 - What is Core Data?
00:02:18 - How To Add Core Data To An Existing Project In Xcode
00:04:25 - Creating Entities data in Core Data
00:06:15 - Modelling your data in Core Data
00:08:41 - Create your own Core Data Model Manually In Xcode
00:13:47 - Creating a Core Data Stack in SwiftUI
00:29:16 - How to Save Data In Core Data In SwiftUI
00:42:05 - Breaking down NSFetchedRequest
00:44:47 - How to Fetch Data from Core Data In SwiftUI
00:46:46 - Hooking up our UI to our Managed Object
00:51:22 - How To Save Data To Core Data In SwiftUI Using The Environment
00:57:31 - How to pass Core Data Objects Between Screens In SwiftUI
01:00:26 - Setting up SwiftUI Previews with Core Data
01:12:00 - Creating An Empty State For Core Data In SwiftUI
01:15:49 - Setting Up Swipe Actions In SwiftUI
01:18:05 - How to delete data in Core Data in SwiftUI
01:23:08 - How To Update Data In Core Data In SwiftUI
01:32:03 - Advanced Core Data Topics & Breather
01:32:31 - Improving And Refactoring Our ContactsProvider
01:41:18 - Improving our Persistence & Validation In Core Data
01:46:07 - Filtering Data in Core Data with a search bar in SwiftUI
01:53:32 - Filtering Data in Core Data with a Menu
02:04:30 - How To Sort Data In Core Data In SwiftUI
02:08:57 - Unit Testing In Core Data
02:26:23 - Code Coverage
02:27:42 - Summary

**********************************
Are you looking to learn more about Core Data and how to use it with SwiftUI in your iOS projects? Look no further! In this swiftui core data tutorial, you'll get over 2hrs of content covering everything you need to know about how to work with core data in swiftui.

I'll introduce you to Core Data and explain what it is and how it works. You'll also learn how to perform essential CRUD (create, read, update, delete) operations in SwiftUI and how to sort and filter your data.

In addition to working with Core Data, you'll also learn how to use SwiftUI previews. We'll also show you how to implement unit testing with Core Data.

This tutorial is perfect for anyone looking to get started with Core Data and SwiftUI in their iOS development journey, or for experienced developers looking to improve their skills.

If you want to try out the final app, you can download it using the link https://apps.apple.com/gb/app/my-best...

**********************************

Check Out My Courses 👨🏽‍🏫

Enjoy my teaching style? Check out my other courses on my website that may interest you, they range from beginner to advanced topics within iOS development.

Link to Website
https://tunds.dev/#courses

**********************************

Join the crew 🤝

Want to help support the channel? Become a member with the join link below and get access to exclusive badges and stickers, as well as other perks that are coming soon.

Become a channel member
https://www.youtube.com/@tundsdev/join

Support in other ways 💕

You can support me for free and help the channel grow so that I can continue to make the best iOS development content for you by liking, commenting, subscribing, and hitting the notification bell.

All of this really helps my channel grow and allows me to keep on making content for you. If you’re interested in subscribing to the channel then you can do so with the link below.

Subscribe to the tundsdev YouTube channel
https://www.youtube.com/c/tundsdev?su...

**********************************

Download Source Code

https://github.com/tunds/youtube-cont...

**********************************

EditorKeys
View Editor Keys Amazing Products with the link below and use the discount code for 10% off any product
www.editorskeys.com/tundsdev

Get a 10% Discount Code on any product with the code below
TUNDSDEV

See my keyboard cover in action with my review below 👇🏾
   • Increase Your Xcode Productivity With...  


#iosdev #iosdevelopment #swift #swiftlanguage #xcode #appdevelopment #mobileappdevelopment #iosappdevelopment #appdeveloper #iosprogramming #iosengineer #appdevelopmenttips #iosdevelopmenttips #swiftui

show more

Share/Embed