Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Ti.App.getVersion not returning version in tiapp.xml

I've been using this on the same project for weeks; it seems to have suddenly stopped working, e.g. in Titanium Developer Edit tab, I set the Version to "0.4" (and verify it is "0.4" in both tiapp.xml and in Info.plist Bundle version). However, in my app, calling Ti.App.getVersion reports an old version number, e.g., "0.3":

var debugVersion = Ti.UI.createLabel
({
    text:'v ' + Ti.App.getVersion(),
    width:'auto',
    height:'auto',
    left:20,
    top:20
});
win.add( debugVersion );

I seem to be missing where the version is being referenced for getVersion(), though the bottom line is that getVersion() doesn't seem to be pulling the version number from tiapp.xml.

Any thoughts? Thanks!

EDIT: I just noticed in main.m there is a string TI_APPLICATION_VERSION and very oddly, it is defined to a different value from:
1) the version field set in tiapp.xml
2) the Bundle version field set in Info.plist
3) the results returned from getVersion()

I seem to have the concept of 'version' set to many different things here…

— asked June 3rd 2010 by karlo kilayko
  • getversion
  • info.plist
  • iphone
  • tiapp.xml
0 Comments

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.