Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16319] CLI: iOS: Empty min-ios-ver causes errors while building

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-04-17T00:19:46.000+0000
Affected Version/sRelease 3.2.1
Fix Version/s2014 Sprint 08, 2014 Sprint 08 Tooling, Release 3.3.0
ComponentsCLI, iOS
Labelsqe-3.2.1, qe-closed-3.3.0, qe-testadded
ReporterSamuel Dowse
AssigneeChris Barber
Created2014-01-27T19:03:18.000+0000
Updated2014-04-23T11:18:58.000+0000

Description

Description

In the TiApp.xml, if you set the minimum iOS version lower than an installed version then it will default to the lowest you have installed. If you enter only a blank space, then it will still default to the minimum.
<min-ios-ver> </min-ios-ver>
However if you enter a null value it will stop the build process.
<min-ios-ver></min-ios-ver>

Steps To Reproduce

1. Create a project in Studio 2. Open TiApp.xml 3. In the section add the following
<min-ios-ver></min-ios-ver>
4. Build the project

Expected Result

Studio should notice there is no value and ignore it, offering the minimum installed iOS SDK as an alternative.

Actual Result

[ERROR] :  TypeError: Cannot read property 'data' of null
    at /Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/titanium-sdk/lib/tiappxml.js:315:56
    at Object.forEachElement (/Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/node-appc/lib/xml.js:31:4)
    at toJS (/Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/titanium-sdk/lib/tiappxml.js:304:10)
    at Object.defineProperty.value (/Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/titanium-sdk/lib/tiappxml.js:599:4)
    at new tiapp (/Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/titanium-sdk/lib/tiappxml.js:671:19)
    at conf.options.appc.util.mix.project-dir.callback (/Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/cli/commands/build.js:98:34)
    at /usr/local/lib/node_modules/titanium/lib/cli.js:631:28
    at conf.options.appc.util.mix.project-dir.validate (/Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/cli/commands/build.js:157:9)
    at CLI.<anonymous> (/usr/local/lib/node_modules/titanium/lib/cli.js:621:14)
    at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:551:21
---------------------------------------------
    at run (/Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/node-appc/lib/subprocess.js:59:8)
    at /Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/iphone/cli/lib/detect.js:410:9
    at /Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/async/lib/async.js:511:21
    at /Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/async/lib/async.js:227:13
    at /Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/async/lib/async.js:111:13
    at Array.forEach (native)
    at _each (/Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/async/lib/async.js:32:24)
    at async.each (/Users/tester/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140124163734/node_modules/async/lib/async.js:110:9)

Comments

  1. Michael Xia 2014-01-27

    I think this should be handled on the SDK side instead to gracefully handle the empty value for minimum SDK version tag since the CLI build should also not fail when user inserts it in tiapp this way.
  2. Chris Barber 2014-04-11

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5595
  3. Deepti Pandey 2014-04-23

    Verified as FIXED using : Mac :10.9.2 Studio - 3.3.0.201404211130 SDK - 3.3.0.v20140422163054 acs-1.0.14 alloy-1.4.0-dev npm-1.3.2 titanium-3.3.0-dev titanium-code-processor-1.1.1-beta1 Xcode :5.1.1 No error has been noticed with Empty min-ios-ver while building.

JSON Source