现在我正在尝试实施Google登录。 我这样跟着: https://developers.google.com/identity/sign-in/ios/sign-in?ver=swift
但我在AppDelegate.swift中遇到错误:
class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate
....
错误:
键入' AppDelegate'不符合协议' GIDSignInDelegate'
帮助我。
答案 0 :(得分:30)
您需要在GIDSignInDelegate
中实现AppDelegate
这两种方法。
func sign(_ signIn: GIDSignIn!, didDisconnectWith user: GIDGoogleUser!, withError error: Error!) {
}
func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
}