How to programmatically get the app version from manifest file?

Former Member
Former Member
Hi,
I'm sorry if it's been asked before, but my search did not yield any results...

I'm trying fo figure out how could you get the app/widget version, that has been defined inside the manifest.xml file?

<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. -->
<iq:manifest xmlns:iq="www.garmin.com/.../connectiq" version="1">
[cut]
</iq:manifest>


Thanks!
  • That's not your apps version. It's always "1" and is the version of what's used to process the .xml file, I believe.

    when you put something in the app store, you can give it whatever version number you want. You could have your own a version number as a property if you want to access in from the code

    "<property id="appVersion" type="string">1.0.3</property>"

    , or use a string

    "var appVersion="1.0.3;"
    or
    "<string id="appVersion">1.0.3</string>
  • Former Member
    Former Member over 9 years ago
    Thank you very much for the explanation!

    :)