nativescript-appinfo
TypeScript icon, indicating that this package has built-in type declarations

0.4.1 • Public • Published

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);
  });

Package Sidebar

Install

npm i nativescript-appinfo

Weekly Downloads

0

Version

0.4.1

License

MIT

Last publish

Collaborators

  • hypery2k