NativeScript AppVersion
Read the current Package ID and Version (name and code) of your NativeScript app.
Installation
Run the following command from the root of your project:
tns plugin add nativescript-appversion
Usage
To use this plugin you must first require / import it:
JavaScript
var appversion = ;
TypeScript
;
getVersionName(Sync)
getVersionNameSync
is the same as getVersionName
, except it doesn't return a Promise.
JavaScript
appversion;
TypeScript
appversion.getVersionName.then;
getVersionCode(Sync)
JavaScript
appversion;
TypeScript
appversion.getVersionCode.then;
getAppId(Sync)
JavaScript
appversion;
TypeScript
appversion.getAppId.then;