nativescript-dev-version

0.2.0 • Public • Published

Nativescript hook plugin to maintain native app version

This plugin takes the version and versionNumber properties from package.json and puts on the specific platform resources: AndroidManifest.xml file for the Android sources, and Info.plist for iOS sources.

Compatible with NS 6.

How to use

$ tns plugin add nativescript-dev-version

The above command installs this module and installs the necessary NativeScript hooks.

Then, specify and maintain the desired release version on the ./package.json file under the nativescript.version property, for example:

{
  "nativescript": {
    "id": "org.nativescript.MySampleApp",
    "version": "1.2.3",
    "versionNumber": "1"
    ...
  },
  ...
}

or:

{
  "version": "1.2.3",
  "versionNumber": "1"
  ...
}

When running tns prepare ... the hooks will take care of the native resources.

On iOS, your Info.plist will get:

<key>CFBundleShortVersionString</key>
<string>1.2.3</string>
<key>CFBundleVersion</key>
<string>1</string>

On Android, AndroidManifest.xml will have:

<manifest
  (...) android:versionCode="10203001" android:versionName="1.2.3"

Breaking changes

When upgading to v0.1.3, for iOS you MUST add "versionNumber": "[value]" to correctly apply on CFBundleVersion in the Info.plist

Readme

Keywords

none

Package Sidebar

Install

npm i nativescript-dev-version

Weekly Downloads

28

Version

0.2.0

License

ISC

Unpacked Size

4.92 kB

Total Files

7

Last publish

Collaborators

  • javier.alejandro.castro