-
Notifications
You must be signed in to change notification settings - Fork 986
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
Custom URL Scheme that has Dynamic URL Params #1227
Comments
Schemes cannot be dynamic. Furthermore, Apple forbids any well-known protocol to be in schemes, including For client-side routing, common practice is to use a hash-based strategy in cordova apps. Pretty url strategies are desirable for traditional websites as the URL is visible but they also require a web server to properly route all urls to the same base web application to handle reloads and such. In cordova, there is no webserver, and the user cannot see the URL, so hash-based routing is generally a sufficient solution. If your QR reader expects a So instead of using the domain name as your variables, you can use other parts of the URL as your variables, and have your application respond to URL changes via Closing this because this doesn't appear to be a bug. You can ask our slack community for support style questions. |
I once implemented a plugin to switch the scheme at runtime. It's very experimental and you have to be a bit careful to make it work properly but it can be useful in some cases. https://github.com/GEDYSIntraWare/cordova-plugin-webview-switch But Norman is right you cannot use http or https. |
I want to change the scheme and hostname in my app to a custom URL scheme that has dynamic url params. Because the URL params are dynamic (using vue.js router) the app needs to account for rendering specific UI and data based on the param.
For instance, I have a QR reader that redirects the user to a view that renders UI based on the URL param id..
So the QR reader redirects the user to a view such as https://xxxxxxxx.com/12345 where the param id is 12345.
In that case, how should I alter the code from my config.xml file below?
Building the app in Vue.js and using https://github.com/m0dch3n/vue-cli-plugin-cordova as a codova plugin.
The text was updated successfully, but these errors were encountered: