由于即使使用正确的密码更新到Swift 3.0,我也会收到不正确的消息。有没有人在Firebase授权用户时遇到过这个问题?使用Swift 3.0的Firebase授权不起作用
@IBAction func LoginToAccount(_ sender: AnyObject) {
if let email = emailLogin.text, let password = passwordLogin.text {
FIRAuth.auth()?.signIn(withEmail: email, password: password, completion: {
(user, error) in
if error != nil{
print("Incorrect")
let alert = UIAlertController(title: "Error", message: "Incorrect Email or Password.", preferredStyle: UIAlertControllerStyle.alert)
let action = UIAlertAction(title: "Ok", style: .default, handler: nil)
alert.addAction(action)
self.present(alert, animated: true, completion: nil)
}else{
if error == nil {
self.performSegue(withIdentifier: "AdminSegue", sender: self)
}
}
})
}
}
}
你是什么意思*不工作*? – Dravidian
如果你告诉我们错误信息是什么,它会很有用。 – Wilson
我的意思是即使使用正确的密码,我只是收到消息字符串“不正确的电子邮件或密码”。在更新到Swift 3.0之前工作正常 –