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.

+3


source to share


3 answers


Adding it

1. Under Project  -> Info -> URL Types     
2. Create new url types
3. Under URL scheme add your bundle identifier.

      



This fixes the problem.

+4


source


Ok, so I finally figured out this problem. I'm pretty sure the problem is with the generic provisioning profile I was using. When I created a provisioning profile that was specific to my application and removed the URL scheme using a wildcard, I no longer had this problem.



+1


source


enter image description here

So, I had this problem for several hours and then I did what you can see in fig. Just enter a different URL type and add the package ID in the schemas.

+1


source







All Articles