Core Data Tutorial - Lesson 3: CRUD - Create, Retrieve, Update, and Delete

preview_player
Показать описание
Learn how easy it is to create, retrieve, update and delete from your Core Data database! In this lesson, I’ve pre-built the user interface and we’ll fill in the Core Data code to make the whole app work.

---- ----
𝗩𝗶𝗱𝗲𝗼 𝗧𝗶𝗺𝗲 𝗦𝘁𝗮𝗺𝗽𝘀:
00:00 Intro
00:31 Initial UI Setup
02:41 Retrieving Data
09:44 Creating Data
15:05 Deleting Data
17:21 Updating Data
19:19 CRUD Recap
20:16 Outro
---- ----

Please note that working with Core Data isn't a beginner level topic. Make sure you've gone through my 29 Day Beginner Challenge first here:

📚 Looking for more training like this? Check out CWC+:

⚡Need some guidance? Check out “The Beginners Journey”:
A guided email series that'll walk you through app development, career building, freelancing, indie app dev for money etc.

📚ALL my recording equipment and recommended books:

⚡To continue learning how to make apps with us, be sure to subscribe to our channel:

⚡And we also have a thriving CodeCrew community where you can meet like-minded iOS learners and get support on your own iOS app development journey!

⚡To continue learning how to make apps with us, be sure to subscribe to our channel:

⚡My guide for Xcode on Windows:

⚡Need motivation? Here's just a sample of the success stories my students have sent in:

CodeWithChris is dedicated to teaching beginners and non-programmers all about how to make an app. On the site, you'll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have successfully picked up Swift, Xcode and app building from my course and materials!

#CoreData #Databases #CodeWithChris
Рекомендации по теме
Комментарии
Автор

This not only the best Core Data tutorial out there but the best tutorial I've watched in my beginner career. It made me feel I am actually starting to understand coding! I am graduating from a 2-year programming course now and I love iOS development. Thanks a lot!

goisborges
Автор

Your Core Data series is so much helpful and understandable. Thank you Chris

RahulYadav-tiqi
Автор

Your Core Data series were the best among I watched. Thank you so much Chris!

yeserguitar
Автор

Thank you so much Chris. You explain the things in a very easy way. great job bro. :) :)

ashishnimbria
Автор

Chris, you make it look so simple. I thought that it would be much harder. Apart from what you are going to show us next time (filtering & sorting), the only issue remaining is what happens when you have two tables/entities joined together.

cruiseqe
Автор

Thank you Chris! Your lessons is a gift for me! Everything is clear and straightforward! There are no usefull information about ios dev in russian.. Best regards.

LexoneRUS
Автор

The best Core Data tutorial by far. Thank you so much.

arcerc
Автор

I saw many vidéos on coredata on youtube, and i never understand, but this Time, i understood all, it’s well explain even for a french guy 👌, well done 😊

jmd
Автор

Thanks Chris, you made core data very simple.

shubham
Автор

core data was a headache before i get your series on it, thanks man

youtubechannel-qxkj
Автор

One of the finest videos for core data

guhanboopathi
Автор

thank you so much it's more easier than I expect

mohamednidhalmrad
Автор

I feel after seen your videos, it’s easy for me 👍🏻

narenkumar
Автор

Thanks Chris for the op content, you really have the easiest way to explain.
Is there a resource to handle multiple views in segmentControl

ahmedelawady
Автор

This tutorial is so helpful, I finally managed to understand core data much better. I have a question though about where should I keep all core data related methods, such as fetch, save and delete? Is it more appropriate to put them in controller, or somewhere in the model layer?

dashapalshau
Автор

At the beginning I thought Core data is going to be very easy but as I dived in it was the first actual challenge I faced while using SwiftUI, and I thought It was too hard, but that obviously isn’t true. So I’d say I’m in the middle, I underestimated it before and then I over complicated it whilst trying to learn it but then I stumbled across yours and Swiftful thinking videos.

pawelpow
Автор

Hello CodeWithChris, thank you very much much for your CoreData videos. In the beginning CoreData is a big challange. But you did a good job.

You already have a video how to copy or rename Xcode projects?

LebenWerden
Автор

Hello, I really enjoy your way of teaching and your explanation style is also admirable :) core concepts are more clear after watching these videos :)
I have one question how can we add object in core data and specific index, like now on adding new item it append item which appears at the end of the list.
Thanks in advance :)

syedaurangzaib
Автор

First off, thank you for these tutorials really helpful!
As side note, just particularly for this sample project I wanted to mention, at 13:30 instead of calling the fetchPeople function and do the fetch I would do something like this to create the user;
self.items?.append(newPerson)
DispatchQueue.main.async {
self.tableView.insertRows(at: [IndexPath(row: (self.items!.count - 1), section: 0)], with:
}
This is only because every time you call the fetch we are fetching entire data just for single insertion in the Core data. Hence it may not be so efficient in performance. Of course it would be different scenario if we needed more data to save.

batuhanipci
Автор

Thanks, Chris for this wonderful video and simplifying things for us. I wanted to know how you inserted "Ted" initially in core data when the application was built. I tried doing that by using the same insert code in viewDidLoad but it's not working. 🤔🙁

saimahmad