Git Product home page Git Product logo

nativescript-dev-version's Introduction

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.

This plugin is mainly a fork of jacargentina/nativescript-dev-version, with the great ideas from speigg/nativescript-dev-version and simplec-dev/nativescript-dev-version.

Compatible with NS 7+.

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.

Warning Remove/comment the lines in your App_Resources/Android/app.gradle:

    // Version Information
    // versionCode 1
    // versionName "1.0.0"

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"

nativescript-dev-version's People

Contributors

tralves avatar jacargentina avatar

Stargazers

Jared Fields avatar Benedict Khoo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.