Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nativescript/appversion

Package Overview
Dependencies
Maintainers
14
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nativescript/appversion

Read the version of your NativeScript app

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
344
decreased by-77.17%
Maintainers
14
Weekly downloads
 
Created
Source

NativeScript AppVersion

NPM version Downloads Twitter Follow

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 = require("@nativescript/appversion");
TypeScript
import * as appversion from "@nativescript/appversion";

getVersionName(Sync)

getVersionNameSync is the same as getVersionName, except it doesn't return a Promise.

JavaScript
  appversion.getVersionName().then(function(v) {
      console.log("Your app's version is: " + v);
  });
TypeScript
  appversion.getVersionName().then((v: string) => {
      console.log("Your app's version is: " + v);
  });

getVersionCode(Sync)

JavaScript
  appversion.getVersionCode().then(function(v) {
      console.log("Your app's version code is: " + v);
  });
TypeScript
  appversion.getVersionCode().then((v: string) => {
      console.log("Your app's version code is: " + v);
  });

getAppId(Sync)

JavaScript
  appversion.getAppId().then(function(id) {
      console.log("Your app's id is: " + id);
  });
TypeScript
  appversion.getAppId().then((id: string) => {
      console.log("Your app's id is: " + id);
  });

Keywords

FAQs

Package last updated on 04 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc