Google User serverAuthCode nil in Objective-C
You need to make sure [GIDSignIn sharedInstance].serverClientID
property is set; the value can be found in Google API Console.
Also, if you got user.serverAuthCode
with nil
value, make sure you called [[GIDSignIn sharedInstance] signOut];
before any subsequent attempts. Otherwise [GIDSignIn sharedInstance]
seems to remember previous configuration.
I have no problem getting the serverAuthCode
in the simulator.
Try NOT running it in the simulator :)
Had the same problem. GIDSignIn.sharedInstance().serverClientID
is the same as GIDSignIn.sharedInstance().clientID
.
Solved by setting serverClientId
too.