Cloud Firestore Get Data (and other operations) with SwiftUI

  Рет қаралды 41,611

CodeWithChris

CodeWithChris

Күн бұрын

Cloud Firestore is a free remote database service that you can use with your mobile app. This enables you to do a lot of cool things for your app such as have user accounts, user generated data, data syncing across devices and more.
This video is Part 2 of a series on how to start using Firestore database with your iOS app. In this lesson, you’ll learn how to get data, create data, delete data and update data in your Cloud Firestore database.
Project source code can be found here:
github.com/codewithchris/fire...
🚨 SPECIAL CWC+ OFFER FOR KZfaq:
cwc.to/youtubeoffer
Firebase
firebase.google.com/
Documentation
firebase.google.com/docs/ios/...
⏱ Timestamps:
00:00 Intro
00:40 Data structure in Firestore Database
06:14 Xcode demo project walkthrough
07:08 Read data from Cloud Firestore
19:52 Write data to Cloud Firestore
27:15 Delete data from Cloud Firestore
32:41 Update Data in Cloud Firestore
40:48 Outro
MY FREE ONLINE COURSE:
⚡ How to make an app in 14 days - cwc.to/14days
CWC+ PROGRAM:
👩‍💻 All our courses in a learning path - cwc.to/plus
WEEKLY UPDATES VIA EMAIL:
✉️ Every Saturday, receive an email digest of new content - cwc.to/newsletter
CONNECT:
🌍 Website - codewithchris.com
😺 GitHub - github.com/codewithchris
📸 Instagram - / codewithchris
🐦 Twitter - / codewithchris
ABOUT CODEWITHCHRIS:
Hi I’m Chris! I’m dedicated to teaching fundamentals about how to make an app. This is important if you’re trying to land an iOS job, be a freelancer, increase or start a business with an app idea. On this channel and my website, you'll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have learned to code and build apps on their own! cwc.to/reviews
DID THESE LESSONS HELP YOU?
Please let me know! - feedback.codewithchris.com
ROADMAP:
roadmap.codewithchris.com

Пікірлер: 87
@zoidian601
@zoidian601 5 ай бұрын
Thanks for this video. I have been struggling coming from web dev to SwiftUI and this is the best, most concise and most clear tutorial I've seen so far on Firebase/SwiftUI integration
@anashassnn
@anashassnn 2 жыл бұрын
Definitely checking out your courses because of this, your teaching style is so easy to follow. Thank you!
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Happy to welcome you to the CodeCrew family, Anas! :) -Arthur
@petehikers6003
@petehikers6003 12 күн бұрын
Very nice tutorials! Thanks a lot Chris!
@ashfaqgames
@ashfaqgames Жыл бұрын
Your tutorials helped me a lot to build my academic project... Thanks a lot !!!!!!
@CodeWithChris
@CodeWithChris Жыл бұрын
Great to hear! :) - Pat
@socerkeeper13
@socerkeeper13 2 жыл бұрын
Amazing! Appreciate the pace and comments.
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Thanks for learning with us, Bradley! -Arthur
@KadirMedia
@KadirMedia 2 жыл бұрын
Thank you Chris , you solved my problem !! Keep it up !!
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Awesome, happy to know this. Thanks for being here! :) -Arthur
@multimedia4953
@multimedia4953 2 жыл бұрын
You helped me soooo much!!!!! Your Videos are easy understandable, also for beginners like me :D
@CodeWithChris
@CodeWithChris 2 жыл бұрын
This comment made our day. One of the reasons why we keep on going. Thank you! -Arthur
@jackmcline8211
@jackmcline8211 2 жыл бұрын
Thanks for this video, you helped me so much
@CodeWithChris
@CodeWithChris 2 жыл бұрын
You are so, so welcome! -Arthur
@vithushanlogeswaran8422
@vithushanlogeswaran8422 2 жыл бұрын
Thank you! need more advanced backend applications using swiftUI and firebase..
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Thank you for sharing, Vithushan! :) -Arthur
@christinakrogmann
@christinakrogmann Жыл бұрын
@CodeWithChris: Is it possible to also share that list you created in this tutorial with other users via Firebase as well?
@erlingmoth
@erlingmoth Жыл бұрын
You are an impressive teacher 🙂
@CodeWithChris
@CodeWithChris Жыл бұрын
Thank you! 😃 - Pat
@kadirguney5051
@kadirguney5051 2 жыл бұрын
You are fantastic man,thanks a lot
@CodeWithChris
@CodeWithChris 2 жыл бұрын
You are more fantastic, Kadir! Thank you! -Arthur
@thepotatoghost7709
@thepotatoghost7709 2 жыл бұрын
Thank you so much!
@CodeWithChris
@CodeWithChris 2 жыл бұрын
You are so welcome! -Arthur
@codigobyte6036
@codigobyte6036 6 ай бұрын
Thank you!
@ChristinaWaelchli
@ChristinaWaelchli Жыл бұрын
@CodeWithChris: How can I rather use the .onDelete(perform: ) function in this example?
@James-pj6cg
@James-pj6cg 2 жыл бұрын
Loved the video..... was really hoping to see how to pass the data to a detail screen where you could see and edit the notes
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Thanks for the kind words. Feel free to post your question on our CodeCrew forum so that our tech support staff can assist you. Go here: codecrew.codewithchris.com. All the best! -Arthur
@amirbakhshi3824
@amirbakhshi3824 2 жыл бұрын
Thank you guys , really up to date content, I have got a question. I want to set custom document ids made of numbers (say 10 digits), because the ids will be shown in the ui as a reference. Is there a way to do that? How can I make sure that the generated id in not occupied in a particular collection?
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello, best if you post this question on our CodeCrew forum so that our technical support staff can assist you: codecrew.codewithchris.com. Thanks for learning with us! -Arthur
@avazbekolimov5739
@avazbekolimov5739 2 жыл бұрын
AMAZING videos thanks to the KZfaq channel "CodeWithChris". Please make more such kind a understandable videos on Firebase with SwiftUI, not only me will appreciate these kinds of helpful videos 🔥👏🤩
@CodeWithChris
@CodeWithChris 2 жыл бұрын
More quality content to come, thanks for subscribing and learning with us! -Arthur
@MozMokotow
@MozMokotow 2 жыл бұрын
This is an amazing tutorial, thank you for that! But there is one thing I don't get :) I'm triggering function in Init() section to fill in my list with data from Firestore but when I check its size (.count) it shows 0, but then, when it displays it's 8. Why, how? :)
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello! Best if you post your question in our CodeCrew forum so that our tech support staff can give you guidance. Go here: codecrew.codewithchris.com. Thanks for learning with us! -Arthur
@juanalvarez2052
@juanalvarez2052 Жыл бұрын
Great Video, quick question ... In the get data function, how would you filter an specific Todo? In my case I practicing getting All users, but I want to filter the one I am currently logged in? I am able to get All users, but I don't want the logged in user to show.
@CodeWithChris
@CodeWithChris Жыл бұрын
Hi Juan! We encourage you to post your question on our CodeCrew forum codecrew.codewithchris.com so that our tech support staff can better assist you. :) - Pat
@SOK-gn6hw
@SOK-gn6hw Жыл бұрын
This is great!
@CodeWithChris
@CodeWithChris Жыл бұрын
Thank you for watching! - Pat
@elimulz
@elimulz 2 жыл бұрын
Hi Chris, have you or will you do a video on paginating data from Firestore?
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello, Eli! Can you kindly post your idea here? app.productstash.io/codewithchris#/ideas Thanks for learning with us! :) -Arthur
@btechstuff
@btechstuff 2 жыл бұрын
Love the videos and happy to be a member of the CC. Wondering two things. 1. Do you prefer SPM or Pods 2. My code seems to jump passed the code completion. How do I find out what the deal is with that? Thanks!
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello, right now the most stable would probably be SPM.. but cocoapods is popular and has more libraries i think. not sure about your code completion you might want to check xcode preferences for that
@PeterFriese
@PeterFriese 2 жыл бұрын
SPM is now the preferred way to add Firebase to your project, but we still support CocoaPods.
@DavidNitzscheBell
@DavidNitzscheBell 2 жыл бұрын
@@PeterFriese SPM is so much cleaner and simpler. No xcworkspace and terminal and so on. Much prefer the simplicity.
@pavanreddy9865
@pavanreddy9865 10 ай бұрын
Can you share the video or reference how we can use zipcodes and get city when enters zipcode? can you share the reference if you have one
@denglishiu
@denglishiu Жыл бұрын
How can you put in a rich text field into Firebase? I want to pass in paragraphs and bullet points and things like that.
@xBL1NDx
@xBL1NDx 2 жыл бұрын
Excellent tutorials Chris, can you make a tutorial on passing data to other collections?or if u already have send the link plsss Thanks, love ur videos!!
@CodeWithChris
@CodeWithChris 2 жыл бұрын
"Hello, i suggest checking out our full courses content then its loaded of information and sample apps which you may like.. check it out here codewithchris.com - Francis"
@benson6465
@benson6465 2 жыл бұрын
This tutorial is awesome , thanks man . Can you make a tutorial about user content management please ? for example , I am trying to build e-learning app for 2 courses, I record and post videos lessons, my problem is that I want for the users to have access to only the class that they signed up for, not both of them. Is it possible to make a tutorial for us about this please ? thanks again.
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello, Benson! Thanks for the kind words. Kindly submit your suggestion here: app.productstash.io/codewithchris#/ideas Thank you! -Arthur
@marypaul9627
@marypaul9627 2 жыл бұрын
Thanks worked..do you have user registration and authentication with Firestore?
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello! Yes we do cover those topics in our courses when we build apps with user accounts. All courses are available on www.codewithchris.com if you want to check it out. @AdrienVillez
@MusicWithFreak
@MusicWithFreak 2 жыл бұрын
Hello, I am reading data and displaying them in List as you do in the video. However, I would like to implement a navigation link on each item in the list do display the info about the specific item. I am not really sure how to pass the current item's data to the destination of navigation link. Any idea? Thank you
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello, kindly post your question in our CodeCrew forum so that our tech support staff can assist you. Go here: codecrew.codewithchris.com. Thank you! -Arthur
@sladew816
@sladew816 2 жыл бұрын
Hello Chris, Xcode is saying. "Cannot find "textfield" in scope" would you happen to know how to fix this? I am following another tutorial of your and running into this problem sometimes. thanks.
@CodeWithChris
@CodeWithChris 2 жыл бұрын
"Hello, you probably put the ""textfield"" variable that you are using inside a function or something.. this might be the reason why you cant use it anywhere else - Francis"
@sagarpatel1757
@sagarpatel1757 2 жыл бұрын
Thanks for amazing videos. I have a question if someone can help with it. I have a project which i want to push it on github. I am using firebase and cloud messaging for push notifications. So i want to hide my server key reference before uploading it to github. How should I proceed with it ? Thanks
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello! Best to post your question and screenshots on our CodeCrew forum so that our technical support staff there can assist you. Go here: codecrew.codewithchris.com. Thank you! -Arthur
@nielsvangorp1
@nielsvangorp1 2 жыл бұрын
Can you make a video of a firebase login screen so that each user can see it's own Todo's? (In swiftui)
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello, kindly post your suggestion here: app.productstash.io/codewithchris#/ideas Thank you! -Arthur
@worldwidewebfinds
@worldwidewebfinds 2 жыл бұрын
i got error like "No exact matches in call to initializer" in ContentView folder when i add item as number format.
@CodeWithChris
@CodeWithChris 2 жыл бұрын
"Hello, some of the codes might have changed by now.. try checking the official documentation maybe they changed things around - Francis"
@pradeepb8190
@pradeepb8190 2 жыл бұрын
Would be great if this tutorial is extended for a logged in user
@CodeWithChris
@CodeWithChris 2 жыл бұрын
More content to come. Thanks for learning with us! -Arthur
@giedriusdevelopment3724
@giedriusdevelopment3724 2 жыл бұрын
@CodeWithCris You should mention real time listening of the new events and updates
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Thanks for dropping by and learning with us! -Arthur
@erlingmoth
@erlingmoth Жыл бұрын
Tak!
@user-cg5wx8pv5u
@user-cg5wx8pv5u 11 ай бұрын
Thank you so much for your content men. Please keep talking slowly, it's easier to understand.
@CodeWithChris
@CodeWithChris 11 ай бұрын
Thanks for taking the time to comment! ❤️
@tarunreddy3599
@tarunreddy3599 2 жыл бұрын
what keyboard do use?
@CodeWithChris
@CodeWithChris 2 жыл бұрын
We'll get back to you. :) -Arthur
@tarunreddy3599
@tarunreddy3599 2 жыл бұрын
@@CodeWithChris Thank you arthur ;)
@Aivirx
@Aivirx 2 жыл бұрын
how can i only read 1 doc instead of all
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Sorry, can you clarify your question? -Arthur
@ajaygirolkar8880
@ajaygirolkar8880 2 жыл бұрын
Why we need to perform all operation on main thread as @Published and @ObservedObject wont take care of that?
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello, best if you consult our tech support for better guidance on this question. Go here: codecrew.codewithchris.com. Thank you! -Arthur
@MaziarShodjaziba
@MaziarShodjaziba 2 жыл бұрын
Could you please show an instruction on how to actually update the data with new information instead of hardcoding the edit or merge part with a string? So that it can get new passed data from the text fields. Thanks for great content as always!
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello! Kindly post your question (and screenshots if needed) on our CodeCrew forum so that our technical support staff there can assist you. Go here: codecrew.codewithchris.com. Thanks for learning with us! -Arthur
@holycaust3763
@holycaust3763 2 жыл бұрын
Did you find a solution?
@bradleystephen3378
@bradleystephen3378 2 жыл бұрын
W video
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Thanks for watching! -Arthur
@j.i.s.a.n2987
@j.i.s.a.n2987 2 жыл бұрын
Hello bro i have some useful app idea will u create mine app
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello, we don't make apps for others, unfortunately. But you can learn how to code yourself, yay! Go here: codewithchris.com/start :) -Arthur
@j.i.s.a.n2987
@j.i.s.a.n2987 2 жыл бұрын
@@CodeWithChris no no sir I don't mean it
@j.i.s.a.n2987
@j.i.s.a.n2987 2 жыл бұрын
@@CodeWithChris actually I want to know that can you creat apps
@j.i.s.a.n2987
@j.i.s.a.n2987 2 жыл бұрын
@@CodeWithChris plz replay me
@wiseguyfittness
@wiseguyfittness Жыл бұрын
This was a great tutorial but the update data part was terrible. I thought you would show the data back in the text fields and then allow the user to edit and then save the data again.
@vibe4394
@vibe4394 10 ай бұрын
Unfortunately an outdated tutorial now. They have changed things like firebase to firebaseCore, the code is different also for connecting to firebase. A lot of outdated information and I am not sure I would spend my time trying to follow this very closely anymore.
How to Setup Firestore database for your SwiftUI app (2021)
26:32
CodeWithChris
Рет қаралды 25 М.
Data Flow in a SwiftUI App
33:15
CodeWithChris
Рет қаралды 52 М.
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 4 МЛН
THE POLICE TAKES ME! feat @PANDAGIRLOFFICIAL #shorts
00:31
PANDA BOI
Рет қаралды 23 МЛН
Getting started with Cloud Firestore on Apple platforms
23:31
Firebase
Рет қаралды 4,6 М.
1. SwiftData CRUD Operations
42:40
Stewart Lynch
Рет қаралды 22 М.
Choosing Photos from the Users Photo Library
30:01
CodeWithChris
Рет қаралды 15 М.
Get Started with Firebase Firestore in iOS | Firebase Bootcamp #8
39:06
Swiftful Thinking
Рет қаралды 11 М.
SwiftUI: Fetching data from Firestore in real-time
13:52
Firebase
Рет қаралды 30 М.
Connect Firebase to Xcode: A Step-by-Step Tutorial | Firebase Bootcamp #1
21:07
Core Data In SwiftUI | SwiftUI Core Data Tutorial
2:29:44
tundsdev
Рет қаралды 21 М.
Setup Cloud Firestore Database 2021 (SwiftUI, Swift Package Manager)
15:16