Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GPPSignInButton not loading GooglePlus.bundle when using storyboards

Using Google+ SignIn for iOS SDK v1.4.1, I have a button of class GPPSignInButton placed in a view in a storyboard. It is connected to a GPPSignInButton outlet. GooglePlus.bundle has been added to the project and is copied into the app bundle and can be loaded (programmatically) from within the app at runtime.

When I run the app, either on a device or in the simulator, the button is blue.

enter image description here

I would expect it show a red Sign-in with Google+ button. Creating the button programmatically results in a button that displays correctly. Inspecting the subviews of button instantiated via the storyboard and those of the programmatically created button shows that the storyboard button is missing a UIImageView instance.

The -ObjC linker flag is set. I've even tried adding -all_load with no effect.

I suspect there is a bug in GPPSignInButton's initWithCoder:. Can anyone confirm or reproduce this?

like image 567
neilco Avatar asked Nov 26 '13 14:11

neilco


1 Answers

The solution was to set the button type to Custom—a step missing from the Google documentation.

like image 67
neilco Avatar answered Nov 14 '22 02:11

neilco