App getting crash when click on GoogleSignIn button
You have to add a URL scheme to your project
- Open your project configuration: double-click the project name in the left tree view. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section
- Click the + button, and add a URL scheme -com.googleusercontent.apps.107731993306-6s44u18onibp6gi0ddj94si1aifshh
https://developers.google.com/identity/sign-in/ios/start-integrating#add_a_url_scheme_to_your_project
As the error clearly says, your app is missing support for the url schemes.
Add the following schemes to your info.plist
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>***Your bundle ID***</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.107731993306-6s44u18onibp6gi0ddj94si1aifshhg6</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>***Something here***</string>
</array>
</dict>
</array>
Check this url for your id => https://developers.google.com/identity/sign-in/ios/start-integrating
Your info.plist should look like ->
I got that crash too. But accepted answer did not help me. I have fixed that crash in other way:
Double check that:
In AppDelegate
straight DNS:
GIDSignIn.sharedInstance().clientID = "536164374389-ivga9a9at2g31nfmhpvdyhc98yf6afnr.apps.googleusercontent.com"
In Info.plist
reverse DNS:
<string>com.googleusercontent.apps.536164374389-ivga9a9at2g31nfmhpvdyhc98yf6afnr</string>