Default Ages Bug Fixes
Tinder Firestore Swipe and Match
In this lesson, let's go over a few bug fixes that will help our overall user experience in our application. The first bug I would like to address deals with the min and max seeking ages not being set up correctly for our logged in user. We'll also go over a few bugs that will be fixed if we default our registration values for our user correctly. Enjoy.

Comments (6)
Robin Wahlgren
4 years ago
Hi Brian! Awesome videos. I have a bug. When click the info button, and swipes the cards in there, to left every thing is fine. But when I swipe to the right I se the half of the one card and the other half card. What to do?
Brian Voong
4 years ago
Robin Wahlgren
4 years ago
Yes it shows up in the sample projekt. I think it's very strange it's not all of the cards who behaving like that.
Robin Wahlgren
4 years ago
i solved it
mystklfrets@gmail.com
4 years ago
@Robin, What was the solution for this issue?
Robin Wahlgren
4 years ago
@mystklfrets, In PhotoController under viewDidLoad I missed a imageView.clipsToBounds = true
mystklfrets@gmail.com
4 years ago
Awesome! Thank You for the quick reply.
Kenny Ho
4 years ago
Did anyone get a bug where when we register a new user, it doesnt present HomeController? You have to rerun the app for it to present the HomeController
Kenny Ho
4 years ago
There was no bug. I was signing in using my name instead of an email address. Brian please allow us to delete our comments. It's so embarrassing...
Kenny Ho
4 years ago
Actually nvm. Yea when registering a new user, it doesn't present. It does present when you are logging in though
Brian Voong
4 years ago
Kenny Ho
4 years ago
Thank you so much Brian! I seem to miss the dismiss in handleRegister.
mashype
4 years ago
I didn't see where you had done this either. I found it in the sample code and fixed it, but do some reason, I never had that call in handleRegiser. All I was doing was printing the statement and it never dismissed the registration controller. You may want to check if you actually included that anywhere in the videos because otherwise, I had to keep re-running the app after I registered a user. Great videos! Super helpful to learn.
lassesilk
4 years ago
Is there any reason you can't put the default ages within the user model ?
Brian Voong
4 years ago
keithkraker
4 years ago
I'm having an issue when I log out from the settings page. It brings me back to the login page and will not let me go back to the registration page. I see in this video that when you log out, it automatically goes back to the registration page. I've been trying to fix this bug for a while now and I'm stumped.. Please help! When you perform Auth.auth().signOut() from the SettingsController what tells the app which page to display when the current view is dismissed?
keithkraker
4 years ago
Figured it out by digging through your code! The issue was within viewDidAppear() in HomeController. I was still using LoginController instead of RegistrationController and I had to add a delegate property to the RegistrationController.
mashype
4 years ago
Same. I couldn't figure that out either until I looked at the code. I think he switched it back to registration controller somewhere along the way, but I never saw it in the videos.
Eugeneberezin
4 years ago
There's a crashing bug in the app. In SwipingPhotosController in setViewControllers we unsafely unwrapping controllers.first! . What's happening if a user for some reason does not have any photos that array will be empty and controllers.firsg will be nil which will crash your app. Instead of ! I recommend using [controllers.first ?? UIViewController()] - it fixed the crashing bug for me.
Eugeneberezin
4 years ago
Correction!!! I encountered a different crash with my solution. I simply recommend use guard let firstElement = controllers.first else {return} and use [firstElement] like that in setViewControllers. If you don't do that and try to scroll to another photo app will crash because it will go outside of the range.
richardbranson
3 years ago
when i am tap on last index photo it will crash on cardViewModel below code fileprivate var imageIndex = 0 { didSet { let imageUrl = imageUrls[imageIndex] // my app is crashing here index out of bound imageIndexObserver?(imageIndex,imageUrl) } }
HELP & SUPPORT