0
私はIOSベースのプロジェクトで、Firebaseの統合後に作業しています。私は、このエラーは、「このメールはひどくフォーマットされて」そうだ はここのcreateUserを使用しているときFirebaseは、電子メールの検証を行うコードIOS - Firebase - この電子メールはフォーマットが間違っています
@IBAction func registerBtn(_ sender: Any) {
if userNameTxt.text != "" && passwordTXT.text != "" {
Auth.auth().createUser(withEmail: userNameTxt.text!, password: passwordTXT.text!, completion: { (user, error) in
if error != nil {
let alert = UIAlertController(title: "Error", message: error?.localizedDescription, preferredStyle: UIAlertControllerStyle.alert)
let okButton = UIAlertAction(title: "OK", style: UIAlertActionStyle.cancel, handler: nil)
alert.addAction(okButton)
self.present(alert, animated: true, completion: nil)
} else {
UserDefaults.standard.set(user!.email, forKey: "user")
UserDefaults.standard.synchronize()
}
})
} else {
let alert = UIAlertController(title: "Error", message: "Kullanıcı Adı ve Şifre Gerekli", preferredStyle: UIAlertControllerStyle.alert)
let okButton = UIAlertAction(title: "OK", style: UIAlertActionStyle.cancel, handler: nil)
alert.addAction(okButton)
self.present(alert, animated: true, completion: nil)
}
}
をチェックしました!これは有効なメールです –
エラーがポップアップしたときにそのラベルを通過している電子メールの例を表示できますか? – Oxthor
[email protected] –