1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    39
    Vote Rating
    0
    shanlin is on a distinguished road

      0  

    Default Unanswered: displaying application version

    Unanswered: displaying application version


    If I like to display our company's application version number in the app, what is the best way to go about it?

    In Java, people can have a Version class which can read an entry(implementation-version) in manifest file, or through some other means. In ST20, we only have a concept of cache manifest. Does ST have any API to deal with that? What would be the suggested way to go about it?

    Many thanks!

  2. #2
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    39
    Vote Rating
    0
    shanlin is on a distinguished road

      0  

    Default


    I realized that one can set version in app.json or package.json. Is there API can get to either of these objects?

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,684
    Vote Rating
    435
    Answers
    3111
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    I don't know of a way to do this automatically from the packager.json or app.json (there is no version config in app.json). I would think you would have to do this in JavaScript to set the version somewhere where you can get it easily.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  4. #4
    Touch Premium Member jep's Avatar
    Join Date
    Sep 2010
    Posts
    861
    Vote Rating
    18
    Answers
    1
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


    I wish there was some built-in support for this, as it's very helpful to have something to tell if the user isn't getting the current version due to ST or browser problems.

  5. #5
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    827
    Vote Rating
    55
    Answers
    84
    jerome76 has a spectacular aura about jerome76 has a spectacular aura about jerome76 has a spectacular aura about

      0  

    Default


    Quote Originally Posted by jep View Post
    I wish there was some built-in support for this, as it's very helpful to have something to tell if the user isn't getting the current version due to ST or browser problems.
    It wouldn't be hard to include a version variable in your code and display/access it.

    But, I understand why you think it should be included, or at least mentioned somewhere.

  6. #6
    Touch Premium Member jep's Avatar
    Join Date
    Sep 2010
    Posts
    861
    Vote Rating
    18
    Answers
    1
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


    No, it's not hard. You just have to keep track of it and update it by hand each time. There's already a great deal of automation involved in the build process. I'd settle for just being able to easily work with the same version that goes in the manifest.

Tags for this Thread