Saving Matches Dynamically
Tinder Firestore Swipe and Match
In the previous lesson, we went over how to manually punch in match information for users. I typically do this to demonstrate how the UI should consume backend data. Furthermore, it helps me confirm that data is structure correctly in my application. Now that we're done with that step, I'll move onto saving match information from within the application. Be careful in this step and don't forget to save the match in the other direction.

Comments (5)
ZpecterZ80
4 years ago
Hi Brian, For this feature, I have reused the swipes collection, iterating over it and then fetching the users data if the document has a value of true. I think it's easier to implement, the database is easier to understand and we don't have to add so much code inside the cardcontroller. I don't know if this implementation has some negative impact on the overall performance. Thanks a lot for all your effort.
Brian Voong
4 years ago
Dongjun Kim
4 years ago
Hi Brian! I really like this bonus step! How can I order by timestamp? just using `.order(by: "timestamp")` end of query?
Brian Voong
4 years ago
Cinquain
4 years ago
Fire
David Guarino
4 years ago
This is just a reminder for those who don't see matched images when the message button is clicked.... ** Make sure your ("red") constants are the same(spelled correctly & capitals) in both HomeController AND MatchesMessagesController** .... and Yes it got me
Greg Reda
3 years ago
Hey Brian, for whatever when I match with a user the current user information is not saved on the other profile. The uid is stored however the image and name are passed as empty "" Any ideas?
Brian Voong
3 years ago
HELP & SUPPORT