[TIMOB-11542] CLI: CLI does not honor xcode select path
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-11T17:10:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.0.0, Release 3.0.2, Release 3.1.0, 2012 Sprint 21 JS, 2012 Sprint 21, Backlog |
Components | CLI |
Labels | cli, qe-ios100112, qe-manualtest, qe-nfc |
Reporter | Clayton Headley |
Assignee | Chris Barber |
Created | 2012-10-17T20:23:25.000+0000 |
Updated | 2014-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.
Work-around is to manually go in and change the Xcode location in the CLI.
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.
Hi Clayton, could you run "titanium info" from the command line and paste the output here? Thanks.
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.
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.
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.
@Chris:
We have previously always allowed user to control which versions of xcode they used with xcode-select. We need to preserve that behavior.
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
Added Release 3.0.2 to fix version.
[~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
[~fokke] Eh, Studio being Studio.
Yup, I think the expected behaviour is what Studio does. The CLI is confusing.