i want to check version update through my IOS Phonegap App. Is there any possible way to get current App version code. please help me to read this version code from config.xml file.
Each WebLogic Server domain contains a central configuration file called the config. xml, which is stored in the DOMAIN_HOME\config directory. Both the Admin Server and the Managed Servers derive their run-time configuration information from the config.
The config. xml file is a persistent store for the managed objects that WebLogic Server creates and modifies during its executing using the BEA implementation of the JMX API. The purpose of config. xml is to store changes to managed objects so that they are available when WebLogic Server is restarted.
config. xml is a global configuration file that controls many aspects of a cordova application's behavior. This platform-agnostic XML file is arranged based on the W3C's Packaged Web Apps (Widgets) specification, and extended to specify core Cordova API features, plugins, and platform-specific settings.
The Cordova config. xml file is the global configuration file of the application. The Cordova configuration file is a mandatory XML file that contains application metadata, and is stored in the root directory of the app.
I'm late to the party, but I wasn't satisfied with any of the answers/plugins (I wanted to do this without a plugin). If Cordova has a way to get the version via the cordova.* api, then I haven't seen that documentation anywhere, so I came up with another method.
Before building the app, I auto-generate the file www/version.js
and include it in my app's index.html:
cat config.xml \
| grep '^<widget' \
| sed -E 's|^.*version="([^"]+)".*|var cordova_app_version = "\1";|' \
> www/version.js
You can then access your app's version via the global variable cordova_app_version
.
Note that I do this in my project's Makefile, which controls all the building/running so this step is automated each time I do a build. Obviously you'll need a make/bash setup with cat/grep/sed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With