Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with confusing URL schemes (iOS) #379

Open
alexp25 opened this issue Jul 8, 2024 · 1 comment
Open

Problems with confusing URL schemes (iOS) #379

alexp25 opened this issue Jul 8, 2024 · 1 comment

Comments

@alexp25
Copy link

alexp25 commented Jul 8, 2024

I am constantly getting errors trying to configure this plugin on Capacitor iOS platform.

Could you clarify what each of the errors mean in terms of incorrect configuration? What error appears on what configuration (and what configuration is correct?)

It's not clear to me:

  • what do I need to put in Podfile as CFBundleURLSchemes: web client id (xxxxxx-xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com) / iOS client id (xxxxxx-yyyyyyyyyyyyyyyyyy.apps.googleusercontent.com) / reversed client id (com.googleusercontent.apps.xxxxxx-yyyyyyyyyyyyyyyyyy) ?
  • what do I need to put in capacitor.config and what do I need to put in the initialize method options (and would they have to be the same as in the Podfile / which one / reversed?)
  • what is serverClientId? Is it the same as web client id? (and why would I need them both? and what is clientId in this case?)

Also, having built the app, and running (but authentication not working), when I try to upload on TestFlight, I get this error:

The following URL schemes found in your app are not in the correct format: [xxxxxx-yyyyyyyyyyyyyyyyyy.apps.googleusercontent.com]. URL schemes need to begin with an alphabetic character, and be comprised of alphanumeric characters, the period, the hyphen or the plus sign only. Please see RFC1738 for more detail.

So it's the other way around? But then the app crashes.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Your app is missing support for the following URL schemes: xxxxxx-yyyyyyyyyyyyyyyyyy.apps.googleusercontent.com'

@alexp25 alexp25 changed the title Problems with URL schemes (iOS) Problems with confusing URL schemes (iOS) Jul 8, 2024
@alexp25
Copy link
Author

alexp25 commented Jul 8, 2024

Figured it out that I had to use the reversed URL scheme in the Info.plist, and the non-reversed URL scheme in the plugin config, both of them for iOS, not web client IDs. Very confusing... this needs better documentation and explicit examples in the Readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant