我正试图在swift-3中实现Google Signin,但我遇到了一个非常奇怪的错误,我正在关注链接https://developers.google.com/identity/sign-in/ios/sign-in?ver=swift。但是我每次都会看到这个错误,一次又一次地实现它。 我在桥接头中添加了以下内容。'AppDelegate'不符合协议'GIDSignInDelegate'
#import <Google/SignIn.h>
我已经安装了吊舱GoogleSignin pod 'Google/SignIn'
这是我的AppDelegate文件代码
class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate { //<--Here it gives the error
//Method implemented but giving the error
func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
//TODO
}
}
'的AppDelegate' 不符合协议 'GIDSignInDelegate'
我已经试过重新安装荚
我有t清洗和其他的事情,但没有注意到帮助。
我想你应该阅读关于协议和代表。 –
您还没有在'GIDSignInDelegate'委托中添加'didDisconnectWith'方法 –
@UmairAfzal嗯,我已经阅读了代表和协议,并且在'didDisconnectWith'方法的前面写了一个单词“optional”,这意味着它不是必须的使用该方法。 @NiravD使用它没有任何区别。 问题依然存在 –