Swift: Firebase 3 - How to Reduce Cost and Support Multiple Users (Ep 11)

preview_player
Показать описание
Today's video is definitely very important for those looking to minimize the cost of their Firebase solutions. We'll go over a very useful fan out strategy that lets us access only a small subset of the entire messages node. In addition, we'll talk about various bug fixes in the app to further polish our code.

Previous Episode 10:

All episodes for Firebase 3 series:

Completed Source Code

Want to learn more about iOS Development? Here are a few additional playlist resources on my channel:

Lets Build YouTube series:

Lets Build AppStore series:

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

I've got a project I'm working on and the fanning out solution you covered in this lesson 100% got me over a hump I've been stuck on for a good while.

The Swift scene has been in dire need of some high quality Firebase 3 guides and you're absolutely nailing it.

Thanks so much for your time and effort. These are crazy, crazy good.

nicolehinckley
Автор

Man! Thanks for the tutorial. I spend more than 2 days working 10 hours a day to find the answer I was looking for, and I found it here. I searched the web, read documentations, and I am subscribed to many Udemy classes, and I found the answer to my code question here. ! I will follow you from now on. NOBODY is teaching or giving an good example of how to do the "query double nested", from min 5 to 14 you basically answer my question. Thanks again

chlanda
Автор

Great Videos, Brian! An FYI for you and anyone else watching, you can further minimize cost by reducing the two Firebase calls you finished at 16:40 to a single call by merging those two calls into a single one as follows:

let userMessagesDictionary = ["/\(fromID)/\(messageID)": 1, "/\(toID)/\(messageID)": 1]


This will update both children at the same time, reducing your cost, as well as preventing the possible (yet very unlikely) case where the first call goes through and the second fails.

Mutoforma
Автор

It's 14th here in Hong Kong and we're already half way to 4k subs, I think your prayers to the Youtube gods are working! (AKA the hard work that you poured in to make these videos)
Hope you can manage to continue updating this channel even though you're in Ray Wenderlich's team now! :D

joshivanilla
Автор

thanks BRIAN, I watch all your tutorials and i follow you and build the apps using storyboard option :), , every day i wait the new Ep. :)

akramyounes
Автор

It was confusing issue. But eventually you managed to break it down very clear. Thank you Mister !

kav
Автор

Thank you Brian.This tutorials are really helpful :)

yusufkildan
Автор

Thanks Brian. Your tutorials are the best ever. :)

yanpainghein
Автор

Thank you Brian, really great tutorials, and it helps me a lot!
I've been following the process, and I encountered a problem that while I am in "MessageController". Whenever I click "Logout" and then log back in as a different user, the message list doesn't get updates, it always show the previous user's message. Seems the function "observeUserMessages()" in viewDidLoad doesn't get called when log back in after a log out event.

xhu
Автор

Thank you Brian for the awesome content

maciekgorecki
Автор

Great tutorials man, thanks for share your knowledge, I'm trying to adapt this code to my web project, I hope to make it XD

felipecastillo
Автор

Awesome Work - best iOS swift videos out there by a mile :)

seeing that you like showing UI more, How about looking at the snapchat Ui?

they have a different layout to all other social media apps.
app always opens on the camera, with what I assume is within a scroll view and then other view controllers are either scrollable or presented modally

piersebdon
Автор

another great tut! Thanks for your effort

marekchojecki
Автор

Hi Brian, this is such a useful video series, great job. 1 question I had was wouldn't it be easier and more efficient to make a new node called "last message" that stores the last message in each chat? so you wouldn't have to get the chat log twice, once to display chat and once to display messages.

football-jevm
Автор

fan of fan out :) thanks to you and david east (i come from a very heavy relational db background...)

neeleshshah
Автор

Great tutorial, but there's one thing I didn't quite catch. It was with this fan-out technique you used to duplicate data. What exactly does Fan-Out mean and why do we use it?

ajafer
Автор

I love you Brian. You should be hired by Apple.

minchaejeong
Автор

let messageId = childRef.key
1])

This's not working for me because messageId isn't String but it's optional type. To resolve this issue, do the following:

if let messageId = childRef.key {
   1])
}

ThuyNguyen-gwdt
Автор

14:45 Yo shorty what's up!!Haha..Savage :D

govindk
Автор

Hi Brian, thanks for your videos! I have checked many and they are so so helpful!
Have you done any related to Push Notifications?

I currently trying (with no success) to send a push notification to the user when a new a new child appears on the Messages child that Controller is observing.

Thank youu!

Denis-pqkq