Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17758] Unhandled exception when using the CLI to build for iOS

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-10-09T15:32:17.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.0.0
ComponentsiOS
Labelsn/a
ReporterRicardo Alcocer
AssigneeChris Barber
Created2014-09-24T22:41:49.000+0000
Updated2015-01-16T21:45:59.000+0000

Description

If an app doesn't have iphone as a valid deployment target in tiapp.xml and try to build for iOS with
ti build -p ios
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

Comments

  1. Chris Barber 2014-10-08

    Master: https://github.com/appcelerator/titanium_mobile/pull/6208 To test, 1) Create an app 2) Edit the tiapp.xml and remove both the "ipad" and "iphone" deployment targets 3) Build the app for any iOS Simulator
  2. Tim Poulsen 2014-10-09

    PR merged
  3. Ewan Harris 2015-01-16

    Verified fix on: Mac OSX 10.10.1 Appcelerator Studio, build: 3.4.1.201410281743 Titanium SDK build: 3.6.0.v20150116070927 Titanium CLI, build: 3.4.1 Alloy: 1.5.1 Xcode 6.1.1 iPhone Sim (8.1) Followed the instructions above, app built to simulator and ran with no problems. Closing ticket.

JSON Source