# nativescript-appversion

> Read the version of your NativeScript app

Latest version **1.4.4** (published 2019-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install nativescript-appversion
pnpm add nativescript-appversion
yarn add nativescript-appversion
bun add nativescript-appversion
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.4 |
| Published | 2019-11-22 |
| First published | 2015-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 49 |
| Author | Eddy Verbruggen |
| Maintainers | eddyverbruggen |
| Keywords | NativeScript, App Version, Version, App ID, AppId, CFBundleVersion, CFBundleShortVersionString |

## Links

- npm: https://www.npmjs.com/package/nativescript-appversion
- Repository: https://github.com/eddyverbruggen/nativescript-appversion
- Issues: https://github.com/eddyverbruggen/nativescript-appversion/issues
- npm.io page: https://npm.io/package/nativescript-appversion

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.4.4 (latest) — 2019-11-22
- 1.4.3 — 2019-11-22
- 1.4.2 — 2019-06-13
- 1.4.1 — 2017-05-02
- 1.4.0 — 2017-04-28
- 1.3.3 — 2017-02-01
- 1.3.2 — 2016-09-19
- 1.3.1 — 2016-09-16
- 1.3.0 — 2016-09-15
- 1.2.0 — 2016-04-15
- 1.1.3 — 2016-02-27
- 1.1.2 — 2016-02-01
- 1.1.1 — 2015-07-12
- 1.1.0 — 2015-07-12
- 1.0.0 — 2015-05-12

## README

# NativeScript AppVersion

[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][npm-url]
[![Twitter Follow][twitter-image]][twitter-url]

[npm-image]:http://img.shields.io/npm/v/nativescript-appversion.svg
[npm-url]:https://npmjs.org/package/nativescript-appversion
[downloads-image]:http://img.shields.io/npm/dm/nativescript-appversion.svg
[twitter-image]:https://img.shields.io/twitter/follow/eddyverbruggen.svg?style=social&label=Follow%20me
[twitter-url]:https://twitter.com/eddyverbruggen

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
```js
var appversion = require("nativescript-appversion");
```

#### TypeScript
```typescript
import * as appversion from "nativescript-appversion";
```

### getVersionName(Sync)
`getVersionNameSync` is the same as `getVersionName`, except it doesn't return a Promise.

#### JavaScript
```js
  appversion.getVersionName().then(function(v) {
      console.log("Your app's version is: " + v);
  });
```

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

### getVersionCode(Sync)

#### JavaScript
```js
  appversion.getVersionCode().then(function(v) {
      console.log("Your app's version code is: " + v);
  });
```

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

### getAppId(Sync)

#### JavaScript
```js
  appversion.getAppId().then(function(id) {
      console.log("Your app's id is: " + id);
  });
```

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

---
_Source: https://npm.io/package/nativescript-appversion · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
