I'm using the Google Sign-In library for iOS, and when I click the Sign-In button the app crashes with the following error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'Your app must support the following URL schemes: <my bundleID>,
com.googleusercontent.apps.<my client ID>'
I inspected the signed version of my app to make sure that those URL schemes are defined, which they are.
I also added 'google' as the identifier for each of the URL schemes because I saw that that's what is done in the sample Google Sign-In app.
This only happens when I build the signed version of my app and do an ad-hoc installation on my phone.
It doesn't happen when running in the simulator through Xcode, or even when running the app for release on the simulator through Xcode.
Does anyone know what to do about this?
Other info that might be useful:
I'm using the Google Sign-In library without cocoapods.
I dragged the library bundle and framework into my project.
Also, I'm using a generic provisioning profile which contains a wildcard in the App ID, and for some reason when I build the signed version of the app the bundle ID of my app gets changed to have the wildcard in it.
i.e. the bundle id gets changed from com.example.app to com.example.*.
Because of this, I added in a third URL scheme which contains the wildcard.
Add the URL scheme:
This resolves the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With