Quick Patch: iTunes 10 detection using 1.4

3D architecture abstract

Tonight, Apple pushed the availability of iTunes 10. iTunes 10 has some issues with our detection script in Titanium and we have posted a patch here. To apply the patch:

1. copy the file into the following directory: /Library/Application Support/Titanium/mobilesdk/osx/1.4.0/iphone and name it prereq.py. (In some cases, Titanium is installed in your personal directory under ~/Library/Application Support/Titanium/mobilesdk/osx/1.4.0/iphone/).

2. in the console, make sure the file is executable: chmod a+x prereq.py

Now, Titanium will correctly detect the appropriate iTunes version and you should be good to go. This fix is already applied to master in Github.


  1. @danno – hmm. that’s weird. this file isn’t related to the other. did you overwrite the wrong file? πŸ™‚

  2. Hmmm…. doesn’t seem to be working for me, maybe I’m missing something because of the late hour, I’ll try again in the morning. Thanks for the quick patch!

  3. First, thanks for being so on the ball and getting a fix out.

    But… is there any chance this sort of fix could actually be rolled out in sub versions e.g. a 1.4.1 (including the API.Info.debug() fix) ?

    Basically a blog post isn’t the way to inform new (and existing) users about this sort of important patch. I’ve seen several people saying that the debug thing is broken – weeks after the blog post, but just because they’ve updated their xcode or something and not seen the post.

  4. I couldn’t get the patch to work, SDK on Test & Package would never get past “loading…” and the certificates wouldn’t load up for running on the device. I played with it for a little bit but have some time critical projects I’m working on so had to find the quickest solution to getting back up and operational.

    I ended up having to downgrade to iTunes 9.2.1 following these instructions: http://bit.ly/bMXY6z be aware that this is a PITA as you have to recreate your library and resync your iPhone. You will also need the old version of prereq.py for Titanium to work.

    I should have known better than to install the latest version of iTunes on day 1 on my work machine and not expect any issues. Lesson learned… πŸ˜‰ Again, thanks for the quick update, I’m just going to wait until it’s sorted out a little before installing the new iTunes again. I don’t even need it on this machine, I don’t know what I was thinking!

  5. gah. I’m in the same boat as Huey.. Even with this fix.. TI Dev will not get past the “loading…” in the SDK dropdown.. *sigh* guess I will downgrade..


  6. hmm Odd… I just downloaded the patch file instead of just grabbing the text to c/p and it seems to work now.. *shrug*

    works now..


  7. Hello,

    I am not found /Library/Application Support/Titanium/mobilesdk directory under my titanium folder what should i do? I upgraded my titanium SDK to 1.4 now.

  8. yup, I was apparently having the same issue as critter copying the raw content over didn’t work, I had to download untar and copy the file directly into the directory. All is working now, thanks for the update!

  9. Aehmm sorry, but here it still does not work πŸ™

    iTunes 10
    Titanium Developer 1.2.1 with 1.4.0 (Including the fix from top) / and 1.4.1

    i reinstalled also XCode but all the same πŸ™

    any ideas guys ?

  10. @Hansjuerge – That means you did not properly apply the patch. If that file is not there (is there when you install Titanium) then you have something screwed up when you followed the instructions.

    Where is your Titanium installed? Re-read above. It might be under your ~/Library/Application Support/Titanium too.

  11. I have been stuck for 4 days now. I cannot get the SDK loading to show the version number. My apps will not load!!! This is not cool.

    • If the patch doesn’t work, please run the following from console and paste the output using Gist or Pastie link. (please don’t paste the entire contents as a reply).

      /Library/Application Support/Titanium/mobilesdk/osx/1.4.0/iphone/prereq.py package

  12. Hi dear Jeff !

    Aehm… My output on the console is just : No such file or directory

    But in XCode i can build and run a package and when i make a new project in Titanium Developer, so the indicator for iPhone SDK and Android SDK becomes green, that means “found SDKs!”

    But if i want to start/test the project in the iPhone simulator, the SDK field is always “loading….” πŸ™

    today i hoped, maybe the problem will be fixed with the new XCode goldmaster for iOS4.1 , but the problem is still the same πŸ™

  13. @Matt – looks like somehow your environment is a little screwed up. My want to try with a different project name. Maybe the project folder was partially created or something.

  14. Tomorow i will all clean up and re-install from the ground , maybe the problem is really on my side πŸ™‚ But now it is to late for me ! Thanks a lot for all your work and the work of your team ! keep up the phenomenal great work !

    • @Matt – seems like maybe you copied into the wrong directory. It should be under the directory named iphone (see above).

  15. @Jeff – the naming didn’t seem to matter. I tried changing it multiple times. Next I tried deleting (after backing up) the ~/Library/Application Support/Titanium dir. Seems to be working now. Thanks

  16. Hi again πŸ™‚

    i reinstalled now Titanium Developer with Patchfix. But the problem is still the same πŸ™ Look at my Video , you will see, there is all in the right place !

    Only the address in the Terminal was wrong in this video (phone instead of iPhone) But also with the right address it has still the same error!

    Anyway! Appcelerator Titanium is great !! (When it works) πŸ™‚

  17. I’m Sorry it’s me again !! But there is something new now (after a Restart/Reset)

    Last login: Tue Sep 7 14:04:35 on ttys000
    Hansjuerg-Wuethrichs-iMac:~ hansjuergwuethrich$ /Library/Application Support/Titanium/mobilesdk/osx/1.4.0/iphone/prereq.py project

    {“success”:true, “sdks”:[“4.1″,”3.2″],”ipad”:true}
    Hansjuerg-Wuethrichs-iMac:~ hansjuergwuethrich$

  18. @Hansjuerg – thanks. this is helpful. it appears that you must have iTunes installed in a non-standard location (i.e. not /Application/iTunes.app?)? Can you confirm where it’s installed? We might need to be smarter about finding it’s installed location somehow.

  19. @Hansjuerg – I’m sorry for your troubles! We made a slight change with the patch in how we resolved the version which is more reliable but it assumes the specific location for the binary. We’ll look to see if we can make this more resilient for the official 1.5 release. Thanks for your help resolving this!

  20. Holy Cow !! Thank you soooooooooo much ! Thank you for your time !! Exactly THIS was the solution for my problem ! i moved iTunes now from /Applications/Music to /Applications and now it works !! But i’m a Titanium Developer user since more than a half year, and iTunes was ever in this Applications/Music location. But since iTunes 10 this problem was new ! But now all things are GREAT !!! Thank you again !

    Sorry for my english, but we understand us πŸ™‚



  21. No no!! you don’t have to say “SORRY” i have to say “THANK YOU !!” πŸ™‚

    So good night “here is after midnight πŸ™‚ “

  22. when I try and run the command from terminal it also says file not found but I noticed it never passes the whitespace between “Application Support”

    • @Gyasi, to manually run it you’ll need to be in the directory or quote it. From the script standpoint, that’s already handled in the tooling.

  23. To correct this issue, follow these steps

    1. Download the file from github
    2. Untar
    3. Replace the prereq.py file in /Library/Application Support/Titanium/mobilesdk/osx/1.4.0/iphone/
    4. Open Terminal
    5. Paste this command: cd ‘/Library/Application Support/Titanium/mobilesdk/osx/1.4.0/iphone/’
    6. Type: ./prereq.py ‘Your Project Name’

    This will assign the proper sdk’s to your project

  24. Yeah i copied your command and for some reason this is what comes out..

    localhost:~ gyasis$ cd β€˜/Library/Application Support/Titanium/mobilesdk/osx/1.4.0/iphone/’
    -bash: cd: β€˜/Library/Application: No such file or directory
    localhost:~ gyasis$

    I’m slightly new to terminal commands but…for some reason i can’t get past the whitespace between “Application Support”. I would change my folder name but that might screw up something else. I’m sure that this (probably simple) thing is keeping the patch from working on my system…It was copied over correctly.

Comments are closed.