Firebase Type' AppDelegate'不符合协议' FUIAuthDelegate'

时间:2017-11-22 17:08:36

标签: ios swift firebase firebase-authentication

我正在使用Firebase 4.6.0Xcode 9.1Swift 4

当我实现FUIAuthDelegate协议及其所需的函数authUI(_ authUI: FUIAuth, didSignInWith user: User?, error: Error?)时,我仍然遇到编译错误" Type' AppDelegate'不符合协议' FUIAuthDelegate'"。为什么呢?

enter image description here

1 个答案:

答案 0 :(得分:1)

对我来说这是通过添加方法解决的

func authUI(_ authUI: FUIAuth, didSignInWith user: FirebaseAuth.User?, error: Error?) {
    print("did sign In")
}

而不是使用

func authUI(_ authUI: FUIAuth, didSignInWith user: User?, error: Error?) {

}