我正在学习使用GoogleSignIn SDK(通过Cocoapods安装)向应用程序进行Google登录。我在pod文件中没有指定版本,它自动安装了GoogleSignIn(4.4.0)。根据文档here,要添加登录按钮,我们需要编写:
GIDSignIn.sharedInstance()?.presentingViewController = self
// Automatically sign in the user.
GIDSignIn.sharedInstance()?.restorePreviousSignIn()
但是在最新的 Xcode 版本 10.3 (10G8) 中,我遇到了错误。
Value of type 'GIDSignIn' has no member 'presentingViewController'
Value of type 'GIDSignIn' has no member 'restorePreviousSignIn'
我尝试搜索有关此更新版本的信息,但很遗憾没有找到。请帮助我整合GoogleSignIn。