I changed the WKPort like mentioned on the README.md to a random number. I think that should be removed for the Android Section. If I do this for the Android platform, Cordova platform will never be ready. So you will never use Cordova Plguins
The root cause is: gap_init called from restricted origin
Working ok for me, do you also have an allow-navigation element with the revised port number?
We should potentially rename it to be ionic-webview-port or something as the wk prefix is from when it was iOS only.
Working ok for me, do you also have an allow-navigation element with the revised port number?
@graemeenglish Could you please share this line of your xml-file?
<preference name="WKPort" value="8081" />
<allow-navigation href="http://localhost:8081/*" />
Thank you very much! This is working :) Without <allow-navigation href="http://localhost:XXXX/*" /> it wouldn't working, but with it is. Think that has to be added to the documentation!
Totally agree on this one.
Maybe a Pull request @paulstelzer ?
WKPort is gone.
You can still put it as part of the new Hostname preference, and now it's documented that if you change Hostname value you'll have to add an allow-navigation entry for the new value to make it work on Android
Closing this issue.
In case it helps anyone we managed to figure it out as something like:
<preference name="Hostname" value="localhost:8100" />
<allow-navigation href="http://localhost:8100/*" />
<allow-navigation href="https://localhost:8100/*" />
Most helpful comment
In case it helps anyone we managed to figure it out as something like: