W.venus W.venus - 1 month ago 46
Swift Question

Swift 3 : AppDelegate does not conform to protocol GIDSignInDelegate

Now I'm trying to implement Google Login.
I followed like this :
https://developers.google.com/identity/sign-in/ios/sign-in?ver=swift

But I got a error in AppDelegate.swift :

class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate
....


error :


Type 'AppDelegate' does not conform to protocol 'GIDSignInDelegate'


Help me.

Answer

You need to implement these two methods of GIDSignInDelegate in your AppDelegate.

func sign(_ signIn: GIDSignIn!, didDisconnectWith user: GIDGoogleUser!, withError error: Error!) {

}

func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {

}