Skip to content

Is a custom androidScheme deprecated in Capacitor 6? #7431

Answered by jcesarmobile
neave asked this question in Q&A
Discussion options

You must be logged in to vote

It's a bug, in Capacitor 6 there is a new javascript injector that requires to provide the url where the javascript execution is allowed, and it's allowed for the app url, i.e. https://localhost, but for google, if using a custom scheme, the hostname should not be included in the url, only the scheme according to this:
https://developer.android.com/reference/androidx/webkit/WebViewCompat#addWebMessageListener(android.webkit.WebView,java.lang.String,java.util.Set%3Cjava.lang.String%3E,androidx.webkit.WebViewCompat.WebMessageListener)

So yeah, something we will need to fix, would be good if you could create an issue and provide a sample app that reproduces the crash.

But anyway, you should …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by neave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants