Symptoms
It is not possible to build an app using a Ti build prior to 3.2.2.GA if you have installed Xcode 5.1. This is due to changes in command-line support for iOS simulators in Xcode 5.1.
This will throw lots of users being prompted to upgrade, but will also lock people into using 3.2.2.GA and higher only.
The error returned below whilst building an app with the TI SDK set to 3.1.2.GA:
[INFO] : Launching application in iOS Simulator
[DEBUG] : Simulator command: "/Users/me/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.GA/iphone/ios-sim" launch "/Path/To/My/App/build/iphone/build/Debug-iphonesimulator/pluggr.app" --sdk 7.1 --family iphone --retina
[TRACE] : Simulator environment: DYLD_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks:/Applications/Xcode.app/Contents/OtherFrameworks
[INFO] : Focusing the iOS Simulator
[ERROR] : Project failed to build after 3s 194ms
If you take the XCode project and launch it directly, you can build the app directly to the 6.1 OR 7.1 simulator. However this build does not work inside Studio or using the CLI
Workaround
Copy ios-sim from 3.2.2.GA (SDK/iphone/ios-sim) and place it in the same location in other SDKs. We used 3.1.3.GA, 3.2.0.GA, and 3.2.1.GA
Tested with:
Xcode 5.1, TiSDK 3.1.2.GA, 7.1 simulator, fails:
Xcode 5.1, TiSDK 3.2.1.GA, 7.1 simulator, fails:
Xcode 5.1, TiSDK 3.2.1.GA, 7.0.3 simulator, fails:
Xcode 5.1, TiSDK 3.2.2.GA, 7.1 simulator, builds fine
The workaround:
Copy ios-sim from 3.2.2.GA (SDK/iphone/ios-sim) and place it in the same location in other SDKs. We used 3.1.3.GA, 3.2.0.GA, and 3.2.1.GATo test:
We ran a combination of the available sims (and using CLI, some not available via currently selected Xcode) using Studio and the CLI.Summary for Studio (we only used 3.2.1 studio):
WE CAN’T parse 3-digit sim versions prior to 3.2.0. See ticket TISTUD-6027 Studio works as expected with the workaround for versions of the SDK 3.1.3, 3.2.0 and 3.2.1 except for trying to launch a simulator with 3-digits with 3.1.3 SDK. Please note, for those customers using 3.1.3 Studio, we expect similar issues running 3-digit sims regardless of the SDK used *Studio 3.2.1* SDK Result 3.2.2 PASS 3.2.1 PASS 3.2.0 PASS 3.1.3 PASS *Summary for CLI:* Xcode 5.1 works as expected with the workaround, except when SDK in project is pre-3.2.0, in which case we get the 3-digit sim parsing issue, which is represented by TIMOB-16247 Additional note: Normally, if you specify a sim to run that is not available in your “Xcode select” version, the CLI will find it (if you have multiple Xcode installs). With the workaround, this fails, so users must either choose a sim that is in Xcode 5.1 or simply not specify. This is due to changes in ios-sim where an Xcode environment variable was changed to an argument, IIRC.Because of changes in Xcode 5.1, we can't fix this issue directly, but users have an easy workaround by copying the ios-sim into previous SDK versions.
Why not just include the sim-file in a new 3.2.2 build of the CLI which it would use when you build against an older then 3.2.2 SDK?
Closing ticket as the issue will not fix and with reference to the above comments.