Read the version of your NativeScript app
npm install nativescript-app-version> Requires NativeScript 2.3.0 (because of iOS 10 compatibility), so upgrade if you're rocking a lower spec: npm install -g nativescript.
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.
```
tns plugin add nativescript-appversion
To use this plugin you must first require() it:
`js`
var appversion = require("nativescript-appversion");
#### JavaScript
`js`
appversion.getVersionName().then(function(v) {
console.log("Your app's version is: " + v);
});
#### TypeScript
`js`
appversion.getVersionName().then((v: string) {
console.log("Your app's version is: " + v);
});
#### JavaScript
`js`
appversion.getVersionCode().then(function(v) {
console.log("Your app's version code is: " + v);
});
#### TypeScript
`js`
appversion.getVersionCode().then((v: string) {
console.log("Your app's version code is: " + v);
});
#### JavaScript
`js`
appversion.getAppId().then(function(id) {
console.log("Your app's id is: " + id);
});
#### TypeScript
`js``
appversion.getAppId().then((id: string) {
console.log("Your app's id is: " + id);
});