Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIDSignInButton is blank

I'm trying to add google login to my iOs app as described here: Integrating Google Sign-In into your iOS app

However, when I add the button to storyboard, it is blank. I can see that some shadow applied and it is clickable, but it have no text on it (The white button at the right side):

enter image description here

To create Google login button I just added UIView and set its class to GIDSignInButton... Could you please tell what am I still missing?

like image 220
Artem Bakanov Avatar asked Nov 16 '15 17:11

Artem Bakanov


3 Answers

It turned out that Pods were not initiated properly and Targets->Project->Build Phases->Copy Pods Resources was missing. Deleting Pods directory didn't help.

The solution was:

sudo gem install cocoapods-deintegrate
pod deintegrate
pod install
like image 117
Artem Bakanov Avatar answered Nov 19 '22 11:11

Artem Bakanov


That's old enough question, I know. But I've met the issue. In case if someone is too, my GIDSignInButton View was blank because under Custom Class the Module was set to "Inherit Module From Target", it shouldn't and Module should be None.

Other options didn't help.

like image 43
khorolets Avatar answered Nov 19 '22 10:11

khorolets


Go to Targets -> Build Phases -> Copy Bundle Resources and add the GoogleSignIn.bundle.

This should solve the issue.

like image 1
Renato Estevam Avatar answered Nov 19 '22 11:11

Renato Estevam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!