Project: titanium
Issue TIMOB-17758: Unhandled exception when using the CLI to build for iOS
If an app doesn't have iphone as a valid deployment target in tiapp.xml and try to build for iOS with {code}ti build -p ios{code} you'll get an error like this: [ERROR] Failed to run command "build" [ERROR] TypeError: Cannot read property 'cyan' of undefined at iOSBuilder.loginfo (/Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/iphone/cli/commands/_build.js:1601:73) at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:610:21 at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:249:17 at iterate (/Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:149:13) at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:160:25 at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:251:21 at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:615:34 at iOSBuilder.initialize (/Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/iphone/cli/commands/_build.js:1578:2) at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:610:21 at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:249:17 --------------------------------------------- at exports.execFile (child_process.js:691:9) at exports.exec (child_process.js:578:18) at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/lib/environ.js:251:3 at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:254:17 at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:157:25 at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:251:21 at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/node_modules/async/lib/async.js:615:34 at /Users/ralcocer/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/node_modules/node-appc/lib/environ.js:218:7
Story points: 5