SwiftData For Beginners: How To Build A To-Do List App In SwiftUI | #1

preview_player
Показать описание

SwiftData For Beginners: How To Build A To-Do List App In SwiftUI

Build A To-Do List App using SwiftData (Swift Data Tutorials) - Free Course

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

*Timestamps:*

00:00 - Intro
00:37 - 🚨Xcode 15 Warning
01:26 - Creating A Model Entity in SwiftData
02:58 - Registering Your Model in SwiftData
03:44 - Quickly Building UI
05:28 - How to Create in SwiftData
08:35 - How to Fetch Data in SwiftData using Query in SwiftUI
11:33 - How to delete data in SwiftData
12:54 - Updating an item in SwiftData
14:34 - Updating an item using a Form in SwiftData
18:19 - Sorting & Filtering in SwiftData

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

The SwiftUI team just dropped a madders, we've now got a CoreData alternative called SwiftData. In this SwiftData CRUD tutorial. We'll be looking at how to build a swiftui todo list app. To discover how swiftdata works. In this swift data app.

This intro to SwiftData in this SwiftData tutorial will show you an introduction to SwiftData in SwiftUI, we'll look at how to tackle SwiftData CRUD operations, SwiftData filtering & SwiftData sorting. In this SwiftData beginner tutorial.

🚨 One thing to keep in mind is that this video was recorded during WWDC week using Xcode 15 beta, some things may change and you may get some crashes sometimes

And you can expect an updated video on my channel with everything related to SwiftData for this iOS todo app tutorial.

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

*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*

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

*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*

*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*

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

*Download Source Code*

Interested in looking at the source code? Then check out the GitHub Repo below

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

EditorKeys
View Editor Keys Amazing Products with the link below and use the discount code for 10% off any product

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

See my keyboard cover in action with my review below 👇🏾

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

RØDE Wireless Mic

RØDE SmartLavPlus Microphone

2021 Apple MacBook Pro (16-inch, Apple M1 Pro chip with 10‑core CPU and 16‑core GPU, 16GB RAM, 1TB SSD) - Space Grey

Apple Magic Keyboard with Numeric Keypad (Wireless, Rechargeable) 

Apple Magic Mouse

Secretlab TITAN 2020 Charcoal Blue Gaming Chair

ErgoFoam Ergonomic Foot Rest for Under Desk

Lumbar Support Pillow

Macbook Stand for Apple Macbook and All Notebooks

Portable Chair Green Screen Background

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

#iosdev #iosdevelopment #swift #swiftlanguage #xcode #appdevelopment #mobileappdevelopment #iosappdevelopment #appdeveloper #iosprogramming #iosengineer #appdevelopmenttips #iosdevelopmenttips #swiftui
Рекомендации по теме
Комментарии
Автор

🚨Xcode Update🚨
At 21:08 starting from Xcode 15 Beta 5, when sorting items you now need to include the root in the keypath too, so update the sort parameter to look like this.

@Query(sort: \ToDoItem.timestamp) private var items: [ToDoItem]

If you're having issues wtih the SwiftUI Previews I'd recommend watching my video in this course that shows you how to handle working with SwiftUI Previews & SwiftData down below!

tundsdev
Автор

Thanks for the video. Getting into Swift now from a C#/React/Angular and this makes sense. Going to check out your other videos as I like your teaching style....and no, the fingers and trolley are cool ways to connect with people.

ShawnChristopher
Автор

Thank you so much for this video! I'm completely new to data persistence and to iOS development in general, so I found it super helpful.

icievmm
Автор

Great video! Can’t wait to try this out 🔥

danielaupont
Автор

Great work. You do such good work. Swift on!

profgallaugher
Автор

Great video - really well explained. Thanks man.

TheBishopOfBarton
Автор

Thanks for the video mate! Having spent hours and hours to learn CoreData is simply amazes me how easy things are now with SwiftData! A 'part 2' of the video could include how to make relationships between models ;-)

evangelosspyromilios
Автор

Brilliant mate, thanks for showing this.

jimmason
Автор

Thanks for your efforts to show how to use SwiftData to build a ToDo app, where essential concepts and techniques are demonstrated. Great! You really help me sort out one of my problems - how to update items in SwiftData without using the trump merge policy. and I found the solution is so easy. Yes, of course because of beta version, the updating view can not be easily previewed, i believe the apple engineers can get it sorted asap before the official version is released. Bravo!

pgong
Автор

Thanks for the vid. Quick and fun tutorial

michanierebinski
Автор

You are awesome man! Thanks for saying my day!!! Wait a minute…. Ma hol coding life!! 👏🏾👏🏾👏🏾👏🏾👏🏾👏🏾

julianjpg
Автор

Thank you for the video! To format a code to multiple lines, it’s actually possible scan the desired code > Right clic > Refractor > Format to multiple lines.

abdouett
Автор

Another great video! Was wondering if you were planning on any videos overviewing Swift Macros. I think I have a general understanding but could use a clearer explanation. How are they different from property wrappers and/or packages?

chrisjackson
Автор

Can't believe the difference between CoreData and SwiftData. Thanks for the vid!

nylelevi
Автор

Thanks for the video, very well explained. Not the first one I see, but the more I see, the more information I get :) Seems you have part 2 already planned, I have ideas for part 3 and maybe 4 and 5 lol :) I have an app that is using Core Data, and I could simplify it if I were to use SwiftData instead, but I haven't figured out how to "migrate" the data from Core Data to SwiftDate. I made several attempts, nothing worked, so a video showing how to migrate from one to another WITHOUT losing any data would be great! Another video would be about sharing SwiftData between iPhone main app and Watch companion app. I tried too, but it always crashes, not sure if I'm doing it wrong or if Xcode beta is unstable. Lastly: I haven't found much information on iCloud storing of the information and syncing with other devices/OSs, that would be another video to consider :) Thank again for the information so far :)

mzish
Автор

It's great that you are pasting code to save time but it would be nice if you quickly go over the code that you pasted so we don't have to pause the video and read the code. Because sometimes there is more code to fit in the screen and we cannot see everything at one time. Just a suggestion. I am enjoying this series.👍

nileshjdarji
Автор

Great Video !
Question, what would you change if you wanted to add additional criteria for sorting ? for example to sort by completed AND by timestamp?

solidenix
Автор

Great tutorial and a starting point to tinker with Swift data.

It's just a shame you can't appreciate the divine taste of a Bounty!
😆

Itchster
Автор

Great video, thank you for sharing. Any chance in the future you could teach on how to add a “Select All” feature to this app to allow for deleting multiple ToDos at once? Again, well done!

aerospaceexportsincorporat
Автор

Just 9mins in but have subbed already, as someone that’s quite in diapers regarding SwiftUI and the surrounding Apple Frameworks this is quite concise and very well explained.
I wonder if it is still alright to peek into CoreData (I also know nothing about it) since SwiftData will probably won’t be backported to previous iOS versions?

I had started 100 Days of SwiftUI and one of the main things is “to not get distracted with too many things” but I guess WWDC23 and the new frameworks deserve a pause on that.
Nevertheless, thanks for this… and for the chuckles too along the way 😅

alejmc