Skip to content
🔢 NativeScript plugin to retrieve the current version of the app
TypeScript JavaScript
Branch: master
Clone or download
Pull request Compare This branch is 51 commits ahead, 31 commits behind EddyVerbruggen:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
spec
.babelrc
.gitignore
.npmignore
.travis.yml
CHANGELOG.md
Jenkinsfile
LICENSE
README.md
appinfo.android.ts
appinfo.common.js
appinfo.common.ts
appinfo.ios.ts
index.d.ts
package.json
platform-details.ts
references.d.ts
tsconfig.json
webpack.config.js

README.md

NativeScript App Info

Read the app infos of your NativeScript app.

For iOS we read it from *.plist's CFBundleShortVersionString.

For Android we read the versionName from AndroidManifest.xml.

Greenkeeper badge Build Status Build Status

NPM

Feel free to donate

Click here to lend your support to: Owncloud Apps and make a donation at www.pledgie.com ! Or donate Bitcoins: Bitcoin

Also via greenaddress

Installation

Run the following command from the root of your project:

tns plugin add nativescript-appinfo

Or if you want to use the development version (nightly build), which maybe not stable!:

tns plugin add nativescript-appinfo@next

Usage

To use this plugin you must first require() it:

var appinfo = require("nativescript-appinfo");

getVersionName

  appinfo.getVersionName().then(function(v) {
      console.log("Your app's version is: " + v);
  });

getBuildNumber

  appinfo.getBuildNumber().then(function(v) {
      console.log("Your app's build is: " + v);
  });

getAppId

  appinfo.getAppId().then(function(id) {
      console.log("Your app's id is: " + id);
  });
You can’t perform that action at this time.