Value of type 'GIDSignIn' has no member 'signInSilently'

3.9k Views Asked by At

What is this error, please guide no material found anywhere on google so far. Below is my code which is giving error:

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()
               }
           }

Two errors coming:

Value of type 'GIDSignIn' has no member 'hasAuthInKeychain'
Value of type 'GIDSignIn' has no member 'signInSilently'
1

There are 1 best solutions below

0
Luan Nguyen On BEST ANSWER

Please check the GIDSignIn version you are using. From v5.0.0:

signInSilently has been replaced with restorePreviousSignIn.

hasAuthInKeychain has been replaced with hasPreviousSignIn.

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