Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

initiate Google Signin without the GIDSignInButton but programmatically

Is there a way to launch the Google SignIn programmatically without pressing on the GIDSignInButton ?

I'm trying to wrap a signal around hitting google api where the user must log in.

sort of :

googleSignInSignal().then(getPersonalDataSignal)
like image 787
Edward Ashak Avatar asked Jul 14 '15 17:07

Edward Ashak


2 Answers

You can actually call this method instead:

GIDSignIn.sharedInstance().signIn()

It worked fine for me and it seems to be a much cleaner approach.

I hope it can help someone with the same question.

like image 165
mvcs Avatar answered Nov 09 '22 02:11

mvcs


You can try something like this - not pretty, but works:

GIDSignInButton *googleButton  =[[GIDSignInButton alloc] init];
[googleButton sendActionsForControlEvents:UIControlEventTouchUpInside];
like image 42
franiis Avatar answered Nov 09 '22 04:11

franiis