'GIDSignIn类型的值没有成员'signInSilently'

问题描述 投票:0回答:1

此错误是什么,请指导到目前为止在Google的任何地方都找不到任何材料。下面是我的代码给出错误:

if GIDSignIn.sharedInstance().hasAuthInKeychain() == false {
               GIDSignIn.sharedInstance().signIn()
           } else {
               if let user = GIDSignIn.sharedInstance().currentUser {
                   service.authorizer = user.authentication.fetcherAuthorizer()
                   fetchEvents()
               } else {
                   GIDSignIn.sharedInstance().signInSilently()
               }
           }

出现两个错误:

Value of type 'GIDSignIn' has no member 'hasAuthInKeychain'
Value of type 'GIDSignIn' has no member 'signInSilently'
ios iphone google-calendar-api swift5 gidsignin
1个回答
0
投票

请检查您使用的GIDSignIn版本。从v5.0.0

[signInSilently已替换为restorePreviousSignIn

[hasAuthInKeychain已替换为hasPreviousSignIn

参考:https://developers.google.com/identity/sign-in/ios/release

© www.soinside.com 2019 - 2024. All rights reserved.