简体   繁体   中英

Is it possible to use Cordova build app from online website

I am very new to Cordova, I havent yet started using it.

From what I am learning, to use Cordova to build an app, you will need offline static HTML, CSS and JS files of your application.

However, my question is, is it possible to build a Cordova from an online site9that you own) eg https://example.com , whose pages are dynamically generated, rather than having on the web pages, assets etc precompiled.

Yes, it is possible to do that, but you need to have a local site. However, this site can simply act as a proxy, for example by loading your server rendered site into an iframe. Or using the fetch api and set the innerHTML of the body tag etc. etc.

There are many ways to achive this. However, if you haven't started yet I would strongly think about using cordova. I'm working on a cordova project myself right now and I find it everything but pleasent to build things for android for example. You need to fiddle around with your setup quite alot... use an old java version for example. i think the latest java version that is supported by cordova is 1.8 (at least that worked for me)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM