Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11542] CLI: CLI does not honor xcode select path

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2014-08-11T17:10:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.0, Release 3.0.2, Release 3.1.0, 2012 Sprint 21 JS, 2012 Sprint 21, Backlog
ComponentsCLI
Labelscli, qe-ios100112, qe-manualtest, qe-nfc
ReporterClayton Headley
AssigneeChris Barber
Created2012-10-17T20:23:25.000+0000
Updated2014-08-11T17:10:34.000+0000

Description

Titanium CLI does not honor the xcode-select path. I have both Xcode 4.4 and Xcode 4.5 installed and use the scode-select path to define which xcode I am using. With the xcode-select path set to Xcode 4.4, the CLI still only sees the path to the Xcode 4.5 install. This returns an error when the simulator is run:
[ERROR] Invalid --ios-version value '5.1'
Accepted values:
   6.0
Steps to reproduce: 1. Install Xcode 4.4 and Xcode 4.5 on the same mac. (I have 4.4 in a folder and 4.5 sitting in Applications) 2. Set the xcode select path to point to the Xcode 4.4 install 3. Open a iOS Titanium Project. 4. Run on Simulator. Expected results: iOS 5.1 simulator should be opened and the project app run. Actual results: The above stated error.

Comments

  1. Dustin Hyde 2012-10-17

    Work-around is to manually go in and change the Xcode location in the CLI.
  2. Chris Barber 2012-10-17

    For starters, this is by design. We no longer care what xcode-select says. Second, Studio is only capable of launching the simulator for the iOS SDKs you have installed, not the iOS Simulators installed. This is a Studio bug. Say your Xcode 4.4 install has iOS SDK 5.1 and iOS Simulators 5.0 and 5.1. Your Xcode 4.5 install has iOS SDK 6.0 and iOS Simulators 5.0, 5.1, and 6.0. You can ONLY run the simulator via Studio for 5.1 -OR- 6.0. The --ios-version selects the iOS SDK version and the --sim-version selects the iOS Simulator version.
  3. Michael Xia 2012-10-18

    Hi Clayton, could you run "titanium info" from the command line and paste the output here? Thanks.
  4. Clayton Headley 2012-10-19

  5. Chris Barber 2012-10-19

    I should have asked what did xcode-select return as the selected path. Based on the output from titanium info, you only have Xcode 4.5 and iOS SDK 6.0 installed. The error you received is correct based on what it was able to detect. You must have Xcode 4.4 installed in some other directory that it doesn't look for.
  6. Dustin Hyde 2012-10-19

    I'm seeing this error as well. I have Xcode 4.5.1 installed with iOS Simulators 5.0 and 5.1 included. The xcode select path is set to 4.5.1. Uninstalling the CLI allowed me to run the 5.1 simulator from studio.
  7. Michael Xia 2012-10-19

    As Chris said, based on what "titanium info" returns, the error is correct, and Studio is passing in the correct iOS version for Xcode 4.4. There is a separate ticket where Studio needs to detect the list of SDKs along with the list of simulators, but it is unrelated to the issue here.
  8. Clayton Headley 2012-10-19

    @Chris:
       xcode-select --print-path
       /Applications/xcode4.4/Xcode.app/Contents/Developer
       
  9. Ingo Muschenetz 2012-10-19

    We have previously always allowed user to control which versions of xcode they used with xcode-select. We need to preserve that behavior.
  10. Smitha Guduru 2013-01-18

    Verified this issue and when xcode 4.4 is selected and I try to run using iOS sdk: 5.1, it runs on xcode 4.4 as expected. But if I choose iOS sdk: 6.0, since xcode 4.4 does not support this version of sdk, xcode 4.5 will get selected automatically which is also expected. The user is able to select the desired xcode versions. So, closing this issue. Verified in: Titanium version: 3.0.22, Mac OS: 10.8.2, xcode versions: 4.4.1, 4.5.2
  11. Chris Barber 2013-01-22

    Added Release 3.0.2 to fix version.
  12. Fokke Zandbergen 2014-06-10

    [~cbarber] same is happening again with Xcode5/6 like explained in http://www.tidev.io/2014/06/03/using-xcode-6-for-titanium/ I'm using 3.3.0-beta CLI
  13. Chris Barber 2014-06-10

    [~fokke] Eh, Studio being Studio.
  14. Ingo Muschenetz 2014-06-10

  15. Fokke Zandbergen 2014-06-10

    Yup, I think the expected behaviour is what Studio does. The CLI is confusing.

JSON Source