Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12135] CLI: Titanium.App.getVersion() returns the bundle version on device, not the tiapp.xml version

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-01-11T15:35:32.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.2, Release 3.1.0, 2013 Sprint 01 JS, 2013 Sprint 01
ComponentsCLI
LabelsRegression, community, module_app_properties, qe-manualtest
ReporterFederico Casali
AssigneeChris Barber
Created2012-12-19T09:22:18.000+0000
Updated2014-08-13T10:14:12.000+0000

Description

Problem description

Titanium.App.getVersion() returns the bundle version on device, not the version defined in TiAPP.xml Not reproducible using 2.1.4 GA

Steps to reproduce

Set the version number in TiAPP.xml (for example 1.25) The Titanium.App.getVersion() works fine on simulator. (returns 1.25) But same code on device returns the bundle version (returns for example 1.25.565432543)
var win = Ti.UI.createWindow({
	title : 'test',
	backgroundColor : 'white'
});

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

win.add(debugVersion);

win.open();

Comments

  1. Chris Barber 2013-01-10

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3695 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3696
  2. Paras Mishra 2013-01-18

    Works fine. Verified on : iphone 5 , simulator ios6 SDK version: 3.1.0.v20130111163212,3.0.2.v20130117161659 CLI version : 3.0.22 OS : MAC OSX 10.7.5 XCode : 4.5.1

JSON Source