Google-signin: Click on the Signin button crashes app (ios)

Created on 21 Dec 2016  路  8Comments  路  Source: react-native-google-signin/google-signin

Clicking on the Google Sign in button is completely crashing my ios app and returning me to the home screen. There are no error messages in the debugger.

I am following the exact setup as the ios example: https://github.com/devfd/react-native-google-signin/blob/master/example/index.ios.js

I've tried modifying onPress to only print out a console.log but the app crashes before reaching the console.log.

Most helpful comment

Yes I was able to solve this. The steps I would take to reproduce the fix I have listed below:

  • Make sure that you are configuring GoogleSignIn using the .configure method (as demonstrated below). The app crashes because of this as it fails to configure correctly without
    GoogleSignin.configure({ iosClientId: env.googleIOSClient })
  • Add the GoogleService-Info.plist to your project.
  • Confirm that the GoogleSignIn.framework is in your Copy Bundle Resources part of the Build Phases. (Without it the application doesn't seem to be able to access the assets necessary)

This is just what I can remember, and I will confirm in an hour or so and edit if I've missed something

All 8 comments

Make sure you set up the client ID first. Run the app via Xcode and check the console there for any additional errors.

I am also having this problem. I set the client ID, but now I get this error:

uiDelegate must either be a |UIViewController| or implement the |signIn:presentViewController:| and |signIn:dismissViewController:| methods from |GIDSignInUIDelegate|

@woomike Were you able to resolve this? I'm seeing something similar.

@johnlev did you solve that problem? I'm also stuck there.

Edit
There is already an open issue for this:
https://github.com/devfd/react-native-google-signin/issues/88

Yes I was able to solve this. The steps I would take to reproduce the fix I have listed below:

  • Make sure that you are configuring GoogleSignIn using the .configure method (as demonstrated below). The app crashes because of this as it fails to configure correctly without
    GoogleSignin.configure({ iosClientId: env.googleIOSClient })
  • Add the GoogleService-Info.plist to your project.
  • Confirm that the GoogleSignIn.framework is in your Copy Bundle Resources part of the Build Phases. (Without it the application doesn't seem to be able to access the assets necessary)

This is just what I can remember, and I will confirm in an hour or so and edit if I've missed something

@johnlev Thanks! The problem was the client id configuration.

@johnlev I did those steps but it's still crashing for me. Did you miss anything?

I am afraid I don't know if there is anything I missed. It's been a while since I reproduced the problem

Was this page helpful?
0 / 5 - 0 ratings