【发布时间】:2021-02-14 16:24:07
【问题描述】:
大家好,有人能告诉我怎么处理吗?我尝试了很多,但如果我纠正一个错误,另一个错误就会出现...... 提前致谢
Auth.auth().createUser(withEmail: eMailTextField.text!, password: passwordTextField.text!) { (data, error) in
if error != nil {
if let errCode = error as NSError? {
guard let errorCode = AuthErrorCode(rawValue: error) else {
print("there was an error logging in but it could not be matched with a firebase code")
return
}
switch errorCode {
case .FIRAuthErrorCodeNetworkError:
print("No Internet Connection")
case .ErrorCodeEmailAlreadyInUse:
print("in use")
default:
print("Create User Error: \(error!)")
}
}
} else {
print("all good... continue")
}
【问题讨论】:
标签: swift firebase firebase-authentication