Titanium and Xcode 4.3: Revisited

The failure of business shown by global network connection in hand of businessman is broken

Xcode 4.3 is now supported in our continuous integration builds. Go to https://build.appcelerator.net to get it, and make sure you are downloading from the master branch.

* Want to skip the back story and go straight to the how-to? Click here

According to our compatibility matrix and a prior post on the developer blog, Titanium 1.8.x does not support Xcode 4.3. That said, we understand that a lot of developers have already updated to Xcode 4.3 and need a way to continue developing with Titanium. While official support for Xcode 4.3 won’t be available until Titanium 2.0 (slated to be released in April), we and the community have come up with a few solutions to keep you creating apps with Titanium.

You’ve got 2 choices…

1. Downgrade to Xcode 4.2.1

The safest and most stable way to continue developing Titanium apps with Xcode is to simply downgrade back to XCode 4.2.1. If you have an Apple iOS developer account, you can still find the “Xcode 4.2.1 for Lion” download available here:


For specific instructions on how to uninstall Xcode 4.3 and then install Xcode 4.2.1, check out this brief walkthrough provided Kevin Farrow in our prior blog post regarding Titanium and Xcode 4.3:

Instructions for downgrading to Xcode 4.2.1 for Lion

2. Live on the edge with Xcode 4.3

So as I stated, Xcode 4.3 isn’t officially supported by Titanium yet, but that doesn’t mean it’s not possible to use. In fact, I’m using it myself. That said, there are a few things you’ll have to do manually to be able to use it. A combination of community contributions and Xcode bug squashing will give you the opportunity to use the latest Xcode before it hits an official Titanium release.

How to use Xcode 4.3 with Titanium 1.8 

  1. Upgrade Mac OSX to 10.7.3 from “ -> Software Update”
  2. Download and install Xcode 4.3.1
  3. Run Xcode 4.3.1 and install any necessary components if prompted. It is not required to delete prior Xcode versions, but you can if you want to.
  4. Install Xcode 4.3.1 command line tools from “Xcode -> Preferences -> Downloads”
  5. sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
  6. Download and extract ios-sim-xcode4.3.tar.gz
  7. Copy the new ios-sim executable to any Titanium SDK paths you are using. For example, if you are testing with Titanium 1.8.1 and 1.8.2, you would do the following:
    cp /path/to/ios-sim ~/Library/Application\ Support/Titanium/mobilesdk/osx/1.8.1/iphone/
    cp /path/to/ios-sim ~/Library/Application\ Support/Titanium/mobilesdk/osx/1.8.2/iphone/
  8. Create a new project, or clean an existing one, and build for the iPhone/iPad simulator and you’ll have your Titanium app running against Xcode 4.3 and iOS 5.1!


  1. Worked for me! Last piece I was missing was the copying of the ios-sim to the right location. Thanks for the clarification.

    Xcode: 4.3
    Ti studio:
    TiMob SDK: mediahack_2.0.0

  2. Works for me too. Until now I was compiling with Titanium and running simulator/device from xcode.

    I did try this solution before and it didn’t work, and only now for some reason when I replaced again the ios-sim with the one from link in step 6 it worked.

    Thanks! thing are much easier this way.

  3. Yup, confirming that the steps for living on the edge with Xcode 4.3 worked a treat – fanstastic, thanks for the tip!

  4. I tried to do this but I get an error when I go to build a app to the simulator.

    This is the error I get:

    dyld: Library not loaded: @rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation
    Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
    Reason: image not found

  5. @Donovan: That error means you didn’t properly add the new ios-sim from step #6 into the appropriate directories as detailed in step #7. Make sure you have the new ios-sim in the correct Titanium SDK directories.

  6. @Geir: Can you confirm that Xcode 4.3 in installed in /Applications and that the command `xcode-select -print-path` returns the value `/Applications/Xcode.app/Contents/Developer`? If that is in fact true, then you likely don’t have the new ios-sim in the right spot. Remember that you must put the new ios-sim in ALL Titanium SDK paths you wish to use, as detailed in step #7.

  7. This doesn’t work for me. I had it working with 4.3, then the error suddenly reappeared. Have tried the downgrading too, but still the same error “Your TARGET_BUILD_DIR is incorrectly set. Most likely you have configured in Xcode a customized build location.”.

    I’ll use Xcode to run the app instead, until this issue has been fixed.

  8. I recently upgraded to Lion 10.7.3 and was disappointed to learn my Titanium apps no longer worked using the iPhone Simulator. I had difficulty getting Xcode 4.2.1 to work at all with Titanium, so I decided to install Xcode 4.3 along with the ios-sim executable all is working very well.

  9. @Tony: I had copied the ios-sim into the the correct iphone folder and it worked a couple of times before the error returned (which is strange). I got it to work properly again yesterday after downloading the latest nightly build and copying the iso-sim over so everything is good, for now 🙂

  10. @Tony,

    If you’re on a 13″ laptop (mine’s the air), the simulator is huge, and doesnt fit on the screen. I had to run change the hardware to be the regular iphone to get it to fit.

  11. I made it though this process without a hitch.

    That said, I’d like to pose a question to everyone to see if you’ve noticed oddities in your applications. I’m having some images showing up as if hires is false, when it’s very certainly set to true.

  12. I am getting the same issue as @donovon. Any one have ideas on what might fix this?

    dyld: Library not loaded: @rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation
    Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
    Reason: image not found

  13. @Richard: You get that error if the new ios-sim is not in the Titanium SDK path specified in step #7. Make sure you have the new ios-sim in the Titanium SDK path for ALL versions you are testing against

  14. @Steve: Have you tried deploying to the device through Titanium Studio? While this fix covers getting Titanium (Studio) working with Xcode4.3, I’m not certain of the scope of all changes to Xcode, including its tools like organizer.

  15. @Steve: Can you log a Titanium Community ticket detailing the issue you are having? Be sure to mention that this workflow used to work for you, and now you are having problems. Also include that the TestFlight workaround works for you. The more details the better. Post that ticket back here, or email us at community and we’ll make sure it get in front of the platform team in short order.


  16. I have tried the procedure above. Although my SDKs were in /Library not ~/Library

    However, when I build an dev version for device (ipad) it seems the build finishes and the app shows up in iTunes,as before.

    However, when I try and copy the app to the iPad with Xcode’s “organizer” window (which is how I’ve been installing apps for months), it fails with the error:

    No application exists in /Users/stevelombardi/Music/iTunes/iTunes Media/Mobile Applications/Tomato Match.ipa

    What’s going on?

  17. @Tony: How would I do that? I already select”Build for iOS device” in Studio. If builds, and the end result of the build is to load into iTunes and ask it to sync… which I can’t do since the device is not synched with this Library. So at this point I used to cancel sync, and copy via organizer.

    Also, I noticed I can install the same app if I upload it to TestFlight.com and install it on the iPad via Safari. It’s just the copy via Xcode.

  18. Little question with regards to the update. Can I just use the master branch with Xcode 4.3 and SDK 5.1 or do I than also need to follow the instructions shown in the blog?

  19. @Wienke: Yes, you should be able to use the master branch, or the latest CI with Xcode 4.3 and iOS 5.1

  20. Sorry but I don’t understand and I m very in hurry…..
    I download as UPDATE said, from master but I don’ t understand where I have to put the folder I found in the zip:



    any help is very appreciated 🙁

  21. sorry to trouble you Tony but I can t launch simulator again:
    it just raise this exception and exit from simulator before starting the app

    dyld: Library not loaded: @rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation
    Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
    Reason: image not found


    Can I suggest you to add a 6.5 or a 7 note like this:

    ls ~/Library/Application Support/Titanium/mobilesdk/osx/

    for ppl like me that is not so smart to read in deep but just read the CODE LOL…

    thank you very much again

  23. @Steve: /path/to/ios-sim is whereever you downloaded and extracted the new ios-sim in step #6.

    Also, as mentioned in the update at the top of the blog post, the latest CI builds now support this without any of the above steps. You can always try those if you still can’t get it working.

  24. Hi Guys,

    Im going through the ringer here with this. Ive installed command line and the two simulators as I stupidly deleted xCode 4.2 and the simulators went as well.

    Where do i find the simulator files referenced /path/to/ios-sim in line 7

    I found the ios Simulator (What appears on the dock when you fire an app up) but nothing appears to be copying across to the mobilesdk folders despite getting no errors from terminal.

    Any ideas would be appreciated, Im going bald through hair tearing out.

  25. Still getting the error

    dyld: Library not loaded: @rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation

    and yes I’ve copied the ios-sim downloaded from the link above to both my 1.7.5 and 1.8.2 folders

    help? :-/

  26. @Yoga: Did you change the Xcode path as in step #5? What is the output of this command:

    `xcode-select -print-path`

  27. Hmmmm I don’t get it… I do the “revised” version (just downloading the master build and Titanium Studio says I don’t have an iOS SDK anymore prompts me to download Xcode from developer.apple)

    What to do?

  28. @Raul: Try what I suggested to Yoga and make sure the path it prints out is the actual location of your Xcode installation.

  29. Aren’t those steps to make Xcode work with older versions? I am trying to use the 2.1 build of Titanium but there is no iOS SDK apparently according to Studio

  30. @Raul: There’s a bug with the Xcode 4.3 install. In some cases, it doesn’t change the developer path appropriately. Run

    `xcode-select -print-path`

    and make sure that it is pointing at your new Xcode install and not the old /Developer path. If it is pointing at the old path, just do step #5 of the process and you should be all set.

  31. Titanium Studio and SDK 2.1.0 can’t run in iOS Device but test program can run in iPhone simulator. it’s build issue occur for iOS device.

    error message follow.

    Traceback (most recent call last): File “/Users/edwintsai/Library/Application Support/Titanium/mobilesdk/osx/2.1.0.v20120330103347/iphone/builder.py”, line 1581, in main(sys.argv) File “/Users/edwintsai/Library/Application Support/Titanium/mobilesdk/osx/2.1.0.v20120330103347/iphone/builder.py”, line 716, in main dist_name = dequote(args[7].decode(“utf-8”)) File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py”, line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0xb4 in position 0: invalid start byte

    Then, I tried to make a new app in Xcode 4.3.1 and install to iOS device successed.

    Can you help me?

  32. Not working for me.

    1. osx 10.7.3
    2. xcode 4.3.2
    3. xcode-select -print-path —>>> reports the following:
    4. downloaded ios-sim-xcode4.3.tar.gz

    ls ~/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/ios*
    /Users/steve/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/ios-sim

    created a new project and I get the following. Sim launches but quits again due to error:
    5. [INFO] One moment, building …
    [INFO] Titanium SDK version: 1.8.2 (02/23/12 17:46 59b3a90)
    [INFO] iPhone Device family: universal
    [INFO] iPhone SDK version: 5.1
    [INFO] iPhone simulated device: iphone
    [INFO] Compiling localization files
    [INFO] Launching application in Simulator
    dyld: Library not loaded: @rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation
    Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
    Reason: image not found
    [INFO] Launched application in Simulator (5.72 seconds)
    [INFO] Application has exited from Simulator

  33. @Steve: You copied ios-sim to the wrong directory. You need to put it in the Titanium SDK’s ‘iphone’ directory for the specific version. Instead of

    /Users/steve/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/ios-sim

    it should instead be in

    /Users/steve/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/iphone/ios-sim

  34. My bad. I listed the wrong directory. I happened to have it in that one also in trying to get it to work. No dice with the correct directory either:

    ls -all ~/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/iphone/ios-sim

    -rwxrwxrwx@ 1 steve staff 70872 Feb 17 13:34 /Users/steve/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/iphone/ios-sim

    I even did a chmod 777 on it just in case.

  35. I am new to Titanium. I used to have a couple samples working with my Titanium end of last year when I last played with Titanium. Now I am back to Titanium to do a project, I have upgraded to Xcode 4.3 and Lion. So I followed the instruction here by first copy the ios-sim to the ~/Users/steve/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/iphone/ directory. After that Titanium no longer complain about ios sdk, but when I run the sample project like HelloWorld I go the following error. Later I did an upgrade with the continuous build url, again the same error.


    [INFO] One moment, building …
    [INFO] Titanium SDK version: 1.8.2 (02/23/12 17:46 59b3a90)
    [INFO] iPhone Device family: universal
    [INFO] iPhone SDK version: 5.1
    [INFO] iPhone simulated device: iphone
    [ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation)
    [ERROR] Error: Traceback (most recent call last):
    File “/Users/lugan/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/iphone/builder.py”, line 1294, in main
    execute_xcode(“iphonesimulator%s” % link_version,[“GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s %s” % (log_id,sdk_version,debugstr,kroll_coverage)],False)
    File “/Users/lugan/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/iphone/builder.py”, line 1200, in execute_xcode
    output = run.run(args,False,False,o)
    File “/Users/lugan/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/iphone/run.py”, line 39, in run
    SystemExit: 65

  36. Now that Titanium 2.0 is out, is it possible to use xCode 4.3.2 with Titanium without tuning anything ? I didn’t see anything in the matrix about version 2.0

  37. For others that may run into this…

    We had upgraded to using xcode 4.3.2 using these instructions and it was working fine. Then I decided to do some clean-up of the old xcode versions. After removing xcode 4.2 from /Developer, when trying to build for a device the *.ipa file was no longer being created. I finally found that builder.py (/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/iphone/builder.py) referenced a program using the “/Developer/*” path directly to create the *.ipa file. I manually patched builder.py to use the “/Applications/Xcode.app/Contents/Developer/*” path and it worked. Then I discovered that the 2.0.1.GA2 version of builder.py worked around this issue. I copied the 2.0.1.GA2 version of builder.py to the 1.8.2 directory and commented out two lines, and things are working nicely!

    No guarantees, but it is working nicely for us!

    $ pwd
    /Library/Application Support/Titanium/mobilesdk/osx
    $ mv 1.8.2/iphone/builder.py 1.8.2/iphone/builder.py.orig
    $ cp 2.0.1.GA2/iphone/builder.py 1.8.2/iphone/

    Then I applied this patch:

    $ diff -u 2.0.1.GA2/iphone/builder.py 1.8.2/iphone/builder.py— 2.0.1.GA2/iphone/builder.py 2012-04-18 09:51:54.000000000 -0400
    +++ 1.8.2/iphone/builder.py 2012-05-07 17:30:53.000000000 -0400
    @@ -12,7 +12,7 @@
    from xml.dom.minidom import parseString
    from xml.etree.ElementTree import ElementTree
    from os.path import join, splitext, split, exists
    -from tools import ensure_dev_path
    +# from tools import ensure_dev_path

    # the template_dir is the path where this file lives on disk
    template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
    @@ -563,7 +563,7 @@
    start_time = time.time()
    command = args[1].decode(“utf-8”)
    – ensure_dev_path()
    + # ensure_dev_path()

    target = ‘Debug’
    deploytype = ‘development’

  38. @ecreatures: you can just upgrade to the Titanium 2.0.1GA2 SDK and these steps are no longer necessary. Titanium Studio should update your SDK for you to a version that works automatically with XCode 4.3.x

  39. I’ve experimented various configuration and downgrades. I’m now with XCode 4.3.1 and I cannot build to devise (iOS) using SDK 5.1.
    Only the simulator works.
    Form running XCode I can see that there’s a trouble regarding a tempFile

    File “/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/iphone/compiler.py”, line 520, in make_function_from_file
    tfile = tempfile.NamedTemporaryFile(mode=”r+b”, delete=False)
    TypeError: NamedTemporaryFile() got an unexpected keyword argument ‘delete’

    As Titanium is just exiting with a system exit 65 error code.
    For the first time in 3 year I feel really like a noob with Titanium and no way to get it work.

Comments are closed.