IOS app crashes when clicking google login button
I am using the Google Login Library for iOS, and when I click the login 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 have checked the signed version of my application to make sure these URL schemes are defined as they are.
I also added "google" as an id for each of the url schemes because I saw that what is done in the google login sample app.
This happens when I create a signed version of my app and do a custom install on my phone.
This does not happen when launching the simulator through Xcode, or even when launching a release app on the simulator through Xcode.
Does anyone know what to do about this?
Additional info that might be helpful:
I am using google login library without cocoapods.
I have dragged the library package and framework into my project.
Also I am using a generic provisioning profile which contains a wildcard in the application ID, and for some reason when I create a signed version of the application, the bundle ID of my application changes it to a wildcard. the bundle id changes from com.example.app to com.example. *.
Because of this, I added in the third url scheme which contains the wildcard.
source to share