I am trying to check if user has logged in before and send them to the home screen if they have. The condition is being met (print is executing) but the segue is not being performed. Function call is in viewDidLoad().
I use the same exact segue statement for a user logging in and it works.
func checkIfSignedInAlready() {
//check if user has signed in already
if UserDefaults.standard.string(forKey: "appleAuthorizedUserIdKey") != nil {
// move to main view
print("USER HAS SIGNED IN BEFORE")
performSegue(withIdentifier: "LogIn", sender: nil)
}
}