Swift 3:AppDelegate不符合协议GIDSignInDelegate [英] Swift 3 : AppDelegate does not conform to protocol GIDSignInDelegate

查看:111
本文介绍了Swift 3:AppDelegate不符合协议GIDSignInDelegate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我正在尝试实施Google登录. 我像这样跟随: https://developers.google.com/identity/sign -in/ios/sign-in?ver = swift

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

但是AppDelegate.swift中出现错误:

But I got a error in AppDelegate.swift :

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

错误:

类型'AppDelegate'不符合协议'GIDSignInDelegate'

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

救救我.

推荐答案

您需要在AppDelegate中实现这两个GIDSignInDelegate方法.

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!) {

}

这篇关于Swift 3:AppDelegate不符合协议GIDSignInDelegate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆