Apologies
You must be signed in to watch this lesson.
Persisting Recent Messages from App
Tinder Firestore Swipe and Match
Having learned how to punch in recent messages manually for Recent Messages, it's time to persist this information from our app instead. This again is fairly straightforward since we've established what the Firestore structure needs to look like. After we save a recent message document for the logged in user, we'll also persist this information in the other direction. Enjoy.

Comments (6)
cofvco
5 years ago
Hey Brian, thanks for these bonus lessons, I learn a lot from it, and how I have 1 question: how can I push ChatLogController from "SEND MESSAGE" button in MatchView?
cofvco
5 years ago
I tried but the parameter cannot be represented in @objc, Can you hint me solution??
Brian Voong
5 years ago
cofvco
5 years ago
yes, I push from HomeController with `matchView.sendMessageButton.addTarget(self, action: #selector(handleSendMessage), for: .touchUpInside)` `@objc func handleSendMessage(match: Match) {}` I have an error: Method cannot be marked @objc because the type.... I tried different ways such as create a dictionary = ["name": user?.name ?? "", "profileImageUrl": user?.imageUrl1 ?? ""] but it nil. Are any ways to do this?
Brian Voong
5 years ago
Michael Evans
5 years ago
Hi Brian Thanks for these bonus lessons. Pretty awesome to be able to add chat functionality to an app. My question is how would we add a badge to alert the user to a new message form someone on the app icon? Is that really challenging or something baked into Firestore?
Brian Voong
5 years ago
Michael Evans
5 years ago
Thanks. Will check it out
jaronbb
4 years ago
Hi Brain, how can I convert `timestamp` to String?
Brian Voong
4 years ago
Cinquain
4 years ago
Fire
gabedelvillar
4 years ago
Hella lit, bro!
Cinquain
4 years ago
lolol facts
aymather
3 years ago
So fire bro, love these lessons! Question: why are you never using DispatchQueue.main.async to update your UI changes on the main thread? That’s something I see a lot, wondering if maybe you’re just tryina keep it simple, or if you actually just have a reason for not using it? Cheers!
aymather
3 years ago
Sorry one last question, In your iphone 8 simulator, you clicked on the accessory view to start typing your text, but the simulator keyboard wasn’t showing up. I have this problem on all my iphone simulators for some reason. You know why this happens/how to fix it? Thanks again :)
HELP & SUPPORT