Read the version of your NativeScript app.
For iOS we read it from *.plist
's CFBundleShortVersionString
.
For Android we read the versionName
from AndroidManifest.xml
.
Run the following command from the root of your project:
tns plugin add nativescript-appversion
To use this plugin you must first require() it:
var appversion = require("nativescript-appversion");
appversion.getVersionName().then(function(v) {
console.log("Your app version is: " + v);
})