I'm comming accross an issue similar to this one. Basically every time my app starts, I have to login with my Google Account.
Then, I have this property:
var isGoogleSessionOpen: Bool {
return GIDSignIn.sharedInstance().currentUser != nil
}
which is called as soon as the app starts to check if I have to show the LoginViewController or not.
My problem is that this call is always nil in first place, so I have to login every time my app starts.
also, as it's mentioned here, I'm configuring the scope like this:
if let signIn = GIDSignIn.sharedInstance() {
signIn.scopes = ["https://www.googleapis.com/auth/plus.login","https://www.googleapis.com/auth/plus.me"]
}
Any idea pls?
Regards
You need to sign in when the app starts.
GIDSignIn.sharedInstance().signInSilently()