【问题标题】:Multiple errors with Firebase auth (Swift 3)Firebase 身份验证出现多个错误(Swift 3)
【发布时间】:2017-09-28 03:14:26
【问题描述】:

由于某种原因,我的这个功能不起作用。

@IBAction func signIn(_ sender: Any) {

    if emailTextField.text !="" && passwordTextField.text !="" {

        FIRAuth.auth()?.signIn(withEmail: emailTextField.text!, password: passwordTextField.text!, completion: user, error) in

        if error != nil {

        } else {
            print("Sucessfully logged in");
        }

    }

    performSegue(withIdentifier: CONTACTS_SEGUE, sender: nil);
}

这些是我得到的错误: http://prntscr.com/f2iuye

【问题讨论】:

    标签: ios swift xcode cocoa-touch


    【解决方案1】:

    使用这个,完成处理程序的语法错误

    FIRAuth.auth()?.signIn(withEmail: self.emailTextField.text!, password: self.passwordTextField.text!) { (user, error) in
        if error == nil {
            print("Sucessfully logged in")
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-14
      • 1970-01-01
      • 1970-01-01
      • 2016-09-23
      • 1970-01-01
      • 1970-01-01
      • 2017-06-18
      相关资源
      最近更新 更多