apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 987 forks source link

what schema and hostname should be set in config.xml #1092

Closed shanlin2dltk closed 3 years ago

shanlin2dltk commented 3 years ago

From version 6.0.0 instruction, it says to set the following in config.xml <preference name="scheme" value="app" /> <preference name="hostname" value="localhost" />

I cannot find any post to explain under what circumstances "app" and "localhost" should be changed, and to what values. Can someone shed some lights? Thanks!

breautek commented 3 years ago

It's up to you. It just simply controls the origin point of the app, e.g: <scheme>://<hostname>

The only limitation is iOS won't allow you to use well known schemes, so you can't set scheme preference to existing protocols, like http or https, etc.