Reads the version of your app from the target build settings.
If you are using cordova-cli, install with:
cordova plugin add cordova-plugin-app-version
With a plain plugman, you should be able to install with something like:
plugman --platform <ios|android> --project <directory> --plugin https://github.com/whiteoctober/cordova-plugin-app-version.git
TODO: Write these instructions
TODO: Write these instructions
If you are using jQuery, AngularJS, WinJS or any Promise/A library (Bluebird), promise style is supported. Use something like:
cordova.getAppVersion.getVersionNumber().then(function (version) {
$('.version').text(version);
});
If not, pass a callback function:
cordova.getAppVersion.getVersionNumber(function (version) {
alert(version);
});
In addition to the version number you can also retrieve other details about your application:
Returns the name of the app. E.g. "My Awesome App"
Returns the package name of the app - the reversed domain name app identifier like com.example.myawesomeapp
Returns the build identifier of the app
Returns the version number of the app
## Credits
Written by Robert (Jamie) Munro at White October
Various others have contributed fixes and new features. See the CHANGELOG.md for details.
Original code based on the following Stack Overflow posts:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型