小编Muh*_*shi的帖子

类型“ GIDSignIn”的值没有成员“ presentingViewController”

我正在学习使用GoogleSignIn SDK(与cocoapods一起安装)登录google到应用程序。我没有在Pod文件中指定版本,该文件会自动安装GoogleSignIn(4.4.0)。在这里浏览文档。根据文档,要添加登录按钮,我们必须编写

GIDSignIn.sharedInstance()?.presentingViewController = self

  // Automatically sign in the user.
  GIDSignIn.sharedInstance()?.restorePreviousSignIn()
Run Code Online (Sandbox Code Playgroud)

但是在最新的Xcode版本10.3(10G8)中,我遇到了错误

Value of type 'GIDSignIn' has no member 'presentingViewController'
Value of type 'GIDSignIn' has no member 'restorePreviousSignIn'
Run Code Online (Sandbox Code Playgroud)

我试图为此搜索更新的版本,但不幸的是找不到。请帮助我集成GoogleSignIn

google-api ios swift google-signin

8
推荐指数
2
解决办法
1797
查看次数

标签 统计

google-api ×1

google-signin ×1

ios ×1

swift ×1