简体   繁体   中英

ViewController does not conform to protocol 'GIDSignInDelegate'

I added GIDSignInDelegate on my ViewController and added function:

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

but Xcode still complaining about protocol. See screenshot

Xcode hint

The documentation at https://developers.google.com/identity/sign-in/ios/api/protocol_g_i_d_sign_in_delegate-p describes two methods. You also need signIn:didDisconnectWithUser:withError:

If you type func didDisconnect Xcode should fill it in for you.

I had the same problem.

It was because I had a class named Error which it was conflicting with google's function.

thanks to evelynklassen in github .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM