Google-signin: the google sign in button is empty on ios

Created on 14 Oct 2016  路  11Comments  路  Source: react-native-google-signin/google-signin

I was able to get everything working but the google sign in button is transparent. It has a border, but nothing else. Is there an additional step needed to configure the background or image for the button? This is on iOS.

Most helpful comment

Adding GoogleSignIn.bundle to the 'Copy Bundle Resources' Build Phase solves the empty button issue.
_Reference_ - Step 2 in https://developers.google.com/identity/sign-in/ios/sdk/#add_the_sdk_your_xcode_project

But the weird black padding issue still persists.

All 11 comments

Same problem, instead of using GoogleSingInButton, I've just created an input button:

    <TouchableOpacity onPress={() => this.props.signIn()}>
        <View style={styles.logoutView}>
            <Text>Google</Text>
        </View>
    </TouchableOpacity>

+1.

The button shows like this -
screen shot 2016-11-15 at 4 36 06 pm

@devfd any idea about this?

Adding GoogleSignIn.bundle to the 'Copy Bundle Resources' Build Phase solves the empty button issue.
_Reference_ - Step 2 in https://developers.google.com/identity/sign-in/ios/sdk/#add_the_sdk_your_xcode_project

But the weird black padding issue still persists.

Same here. Any news on this?

Thanks @prithsharma, what you suggested works for me.

Hi @prithsharma did you find any workaround for black padding ?

Nope.
I didn't spend much time on it since then though. Tell us if find a solution.

@mavarazy what you suggests seems to be the way around. Do you happen to have a sample code of the snippet you posted above to refer to ? Might help all of the above participants.

@mavarazy thank you for the idea. I built on your idea and now can style the button as required. Didn't notice that the code given above is enough to get started. Thanks !

I have omitted the <GoogleSignIn/> component and instead went for my own custom button.

I figured out a way to remove the black border. Just make the google signin buttons background color transparent. Example:
<GoogleSigninButton style={{backgroundColor: 'rgba(0,0,0,0)'}}/>

@pikusinski thanks! I feel that this should be a part of the README

Was this page helpful?
0 / 5 - 0 ratings