Firebase Firestore: CRUD | Swift 4, Xcode 9

preview_player
Показать описание
Today we go over CRUD operations (create, read, update, delete) with Firebase's new database, Firestore, using Swift 4. This is a step by step tutorial that will explain what is happening in each line of code so you can grasp the full concept of how to get up and running with Firestore and set it up and a production ready way.

Most modern apps require users to interact with one another, and having a server/databse that can make that happen is very important. Learning how to use Firebase with your iOS app can help you become a full stack developer, thus making you a more valuable employee. It can also be a useful skill to test different techniques outside of your production app by replicating the results of your own server and exploring possibilities.

Video Breakdown:

0:00:00 - Intro
0:03:14 - Demo
0:04:20 - The starter project
0:07:11 - Setting up the user object
0:16:30 - Firebase Console
0:19:30 - Firebase iOS setup
0:26:00 - Firestore helper service
0:29:55 - Firestore collections explained
0:32:30 - Create
0:36:55 - Read
0:42:25 - Update
0:44:35 - Delete
0:47:15 - Improving access to collection references
0:52:25 - Codable User
0:55:25 - Encodable create
1:09:05 - Decodable read
1:12:00 - Decodable snapshot
1:25:00 - Encodable Update
1:33:15 - Identifiable delete
1:37:50 - Sign out

See what's next on the schedule by checking out my Trello board:

The finished project is available to any students of the free YouTube On my website. Make sure you enroll today:

If you have any questions or comments about the tutorial, or want to suggest a video to make, feel free to leave a comment below, or reach out to me on Twitter:

If you found this tutorial helpful, make sure to subscribe to the channel for more great tutorials.
Рекомендации по теме
Комментарии
Автор

That was incredible, it's amazyn. Thanks guy.

dinomarino
Автор

It's because ur funny and know how to entertain that I learn much faster watching your videos. Much love brother, keep up the good work!

sirrealistically
Автор

Oh how I wish I had watched this video much, much sooner...


it was great. Thank you, and keep up the good work. Like seriously, I'm counting on it

quietcheetahss
Автор

This vid should have more views, not a lot of people sharing expertise with firestore. Awesome video Kilo.

jonathanbecerra
Автор

that was pretty cool. it worths every second of my one and half hours watching. keep up the good work kyle!

afinaray
Автор

Solid! Cleanest implementation of Firestore CRUD operations that I've seen so far.

seanperez
Автор

Man, that was a lot to process. Not bored, by any stretch. Brain exploded? Yeah, a little. I love the FIR files/classes you create to consolidate code, etc. Some good ideas in here. Now, I just need to figure out how to implement them in my app, which has a bit more than two fields in `users` and has more collections than just `users`.

Wish me luck.

DavidNitzscheBell
Автор

you are my favorite xcoder keep doing ur thing

theboywhocriedswag
Автор

YOU KILLED ME WHEN YOU WHISPERED "CODE PASSIONATELY" LOL!!!

ingongoyama
Автор

Got some inspiration from your approach and I think there is some space in the Firebase Codebase to make it easier to do CRUD. After trying out some things I will see if I can improve the Firebase codebase

leons
Автор

Your tutorials are so good! Thank you for your effort :)

jamesclarke
Автор

Fantastic tutorial. Love your coding style!

baileyconradt
Автор

For an app that uses User Authentication and then stores profile information (First Name, Last Name, DOB, gender, etc.), I guess you'd include the Auth.auth().currentUserID as a User field in Firestore in order to link the two?

DavidNitzscheBell
Автор

Thank you bro I am gonna practice it tomorrow

User-mrti
Автор

Extremly useful video, thank you. Could you make one more about that nerwork layer, that you've said?

danylosluzhynskyi
Автор

Thanks for a really good video, its to few advanced tutorials out there! Ohh yeaaah oooh yeah

josefsantamaria
Автор

Hi Kyle!
I like your videos, I've almost learnt everything from them! And I also appreciate you explain everything step by step.
I would like to ask a question: how can I send a message to all of the users, when for e.g. there is something new in the application?

belafekete
Автор

Hey Kyle, for your future reference, setData is better when you have to map a specific user to a document in your collection.

SaifKmusic
Автор

Hey Kilo..Your tutorials are very helpful to see the whole development process on these topics. The data nesting in Firebase seems different than what I am used to with SQL formats. Are you planning to do a tutorial with nested data in Firebase? Could you show us something maybe with users and their associated 'Sweets' as nested data?

sethmerritt
Автор

Thanks for posting this video, that clears up lot for me! A question, is it possible to unit test generics? I need to review generics as well.

meepable