Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16613] iOS: Unable to launch simulator on Xcode 5.1 with Titanium SDK builds < 3.2.2.GA

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2014-03-11T22:39:30.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsios, xcode
ReporterKetan Majmudar
AssigneeShak Hossain
Created2014-03-11T14:34:16.000+0000
Updated2017-03-22T18:07:20.000+0000

Description

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

Comments

  1. Tim Poulsen 2014-03-11

    Tested with:

    Xcode 5.1, TiSDK 3.1.2.GA, 7.1 simulator, fails:

       [INFO]  Focusing the iOS Simulator
       [ERROR] An error occurred running the iOS Simulator
       [ERROR] dyld: Library not loaded: @rpath/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
       [ERROR]   Referenced from: /Library/Application Support/Titanium/mobilesdk/osx/3.1.2.GA/iphone/ios-sim
       [ERROR]   Reason: image not found
       [ERROR]   
       [ERROR] Project failed to build after 20s 760ms
       

    Xcode 5.1, TiSDK 3.2.1.GA, 7.1 simulator, fails:

       [INFO]  Invoking xcodebuild
       [ERROR] ** BUILD FAILED **
       [ERROR] The following build commands failed:
       [ERROR]         Ld build/Debug-iphonesimulator/Animator.app/Animator normal i386
       [ERROR] (1 failure)
       

    Xcode 5.1, TiSDK 3.2.1.GA, 7.0.3 simulator, fails:

       ti build --platform ios --sim-version 7.0.3
       ...
       [INFO]  Launching application in iOS Simulator
       [DEBUG] Simulator command: "/Users/tpoulsen/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.GA/iphone/ios-sim" launch "/Users/tpoulsen/Documents/Appcelerator_Studio_Workspace/Animator/build/iphone/build/Debug-iphonesimulator/Animator.app" --sdk 7.0 --family iphone
       [INFO]  Focusing the iOS Simulator
       [ERROR] Project failed to build after 14s 363ms
       

    Xcode 5.1, TiSDK 3.2.2.GA, 7.1 simulator, builds fine

  2. Ingo Muschenetz 2014-03-11

    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.GA

    To 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.
  3. Ingo Muschenetz 2014-03-11

    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.
  4. Fokke Zandbergen 2014-03-12

    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?
  5. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source