Firebaseのアカウントを削除すると自動的にユーザーがログアウトするのですか?
ログイン画面を削除した後に彼を見せたいのであれば、そのVCを提示するだけでいいですか?
私はこれを頼んでいます。私がこれを好きなら、クラッシュし、この時点でユーザーがもう存在しないからだと思います。
私はそうですか?Firebaseからアカウントを削除すると、自動的にユーザーがログアウトされますか?
一部explenationsとコード:
let user = FIRAuth.auth()?.currentUser
user?.deleteWithCompletion { error in
if let error = error {
// An error happened.
} else {
try! FIRAuth.auth()!.signOut()//This is unnecessary?
let mainStoryboard: UIStoryboard = UIStoryboard(name:"Main",bundle:nil)
let WelcomeViewController: UIViewController = mainStoryboard.instantiateViewController(withIdentifier: "WelcomeViewController")
//Send the user to the WelcomeViewController
self.present(WelcomeViewController, animated: true, completion: nil)
// Account deleted.
}
}
あなたは既にあなたのユーザーにサインインしています。 – Dravidian
しかし、私はユーザーを歓迎するように指示した後にクラッシュするのはなぜですか? –
正確にどこにエラーが表示されますか?このクラスか 'WelcomeViewController'そして何行目? – Dravidian