I'm trying to add Google sign in functionality to a custom button, and I'm following this tutorial. It's telling me to select the button, and set its class as GIDSignInButton
, then add this code: @IBOutlet weak var signInButton: GIDSignInButton!
.
However, it doesn't let me set the class to GIDSignInButton
. When I type it in and press enter, the field just clears.
You should try assign GIDSignInButton not to the Button Object from the Object library but to the the View Object instead
It's work for me.
It will look like this using UIView instead of UIButton.
You can create UIButton and then on its action method you can write this code for signing via google:
GIDSignIn.sharedInstance().signIn()
It works for me, in this way you can customize UIButton according to your requirement and also perform signin by using google
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With