Hello Team,
I want to create a hybrid app using the Capacitor library.
As much as I read in the documentation, to convert any web app into a mobile app, we need to create the build of that web app and sync that build with Capacitor to convert it into the app. Things are working fine with this approach.
Now, I have an already built website hosted at some address, let’s say www.example.com
and I want to create an app of it but I can’t create a build of that website because of two reasons-
- I don’t have access to that website’s code.
- The website is built with HTML, CSS, and jquery so the build can’t be created without using any extra tools.
That’s why I am looking for a way to pass that website’s URL instead of passing the build. Same way as react-native does.
If we want to pack a website into an app using react-native, we can use react native’s web view plugin and pass any remote website’s URL, and the plugin will open that website content in the web view inside the app.
One benefit of passing the URL is that if any small change is made, I don’t need to re-create the build and generate APK again.
There is a way to pass the URL to the server
param in Capacitor configuration file but this is recommended for the local development path.
server: {
url: "local_network_web_address"
}
However, if I pass the URL to this “URL” param, the website is working but is it the right approach?
Is it possible to pass the remote website’s URL to the Capacitor to pack a website in the app?
Thanks,