Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/102.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何确定用户何时在swift中使用FirebaseUI成功登录?_Ios_Swift_Firebase_Firebase Authentication_Firebaseui - Fatal编程技术网

Ios 如何确定用户何时在swift中使用FirebaseUI成功登录?

Ios 如何确定用户何时在swift中使用FirebaseUI成功登录?,ios,swift,firebase,firebase-authentication,firebaseui,Ios,Swift,Firebase,Firebase Authentication,Firebaseui,要使用firebaseUI库登录用户,可以执行以下操作: 让authUI=FUIAuth.defaultAuthUI() 守卫authUI!=没有别的{ 返回 } authUI?.providers=[ FUIEmailAuth(),//有效 FUIGoogleAuth(),//有效 FUIOAuth.appleAuthProvider()//不工作 ] authUI?.delegate=self authUI?.shoulldhidecancelbutton=true 让authViewCon

要使用firebaseUI库登录用户,可以执行以下操作:

让authUI=FUIAuth.defaultAuthUI()
守卫authUI!=没有别的{
返回
}
authUI?.providers=[
FUIEmailAuth(),//有效
FUIGoogleAuth(),//有效
FUIOAuth.appleAuthProvider()//不工作
]
authUI?.delegate=self
authUI?.shoulldhidecancelbutton=true
让authViewController=authUI!。authViewController()
authViewController.modalPresentationStyle=.overCurrentContext
self.present(authViewController,动画:true,完成:nil)
根据文档,完成用户登录后,您将包括以下功能:

func authUI(authUI:FUIAuth,使用authDataResult:authDataResult?签名,错误:error?){
如果let user=authDataResult?.user{
打印(“很好!您已以\(user.uid)身份登录”)
性能检查(标识符:K.welcomeSegue,发送者:self)
}
}
然而,在我的代码中,当我使用Apple登录选项时,这个函数永远不会运行。我需要在什么地方调用这个函数吗?如果是,我怎么称呼它

以下是my view controller的完整代码:

类WelcomeViewController:UIViewController,FUIAuthDelegate{
@IBVAR弱var标题标签:UILabel!
覆盖函数视图将出现(uo动画:Bool){
if(Auth.Auth().currentUser!=nil){
self.performsgue(标识符:K.welcomeSegue,发送者:self)
}
}
@已按iAction func登录(u发件人:ui按钮){
让authUI=FUIAuth.defaultAuthUI()
guard authUI!=无其他{
返回
}
authUI?.providers=[
FUIEmailAuth(),
FUIGoogleAuth(),
FUIOAuth.appleAuthProvider()
]
authUI?.delegate=self
authUI?.shoulldhidecancelbutton=true
让authViewController=authUI!.authViewController()
authViewController.modalPresentationStyle=.overCurrentContext
self.present(authViewController,动画:true,完成:nil)
}
func authUI(authUI:FUIAuth,使用authDataResult:authDataResult?进行签名,错误:error?){
如果let user=authDataResult?.user{
打印(“很好!您已以\(user.uid)身份登录”)
性能检查(标识符:K.welcomeSegue,发送者:self)
}
}
}