Appcelerator Blog

The Leading Resource for All Things Mobile

Quick Patch: iTunes 10 detection using 1.4

0 Flares 0 Flares ×

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.

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Email -- 0 Flares ×

38 Comments

  1. this is the response that i got when now trying to just run the emulator :
    http://pastie.org/1133119

    any reason why?

  2. @danno – hmm. that’s weird. this file isn’t related to the other. did you overwrite the wrong file? :)

  3. Huey

    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!

  4. Ranguard

    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.

  5. Huey

    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!

  6. Thanks for the quick fix, it all works now again.!

  7. k00k

    Totally agree with Ranguard!

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

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

    meh

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

    thanks

  11. i tried the partch but i cannot use emulator… the sdk menu is stuck on “loading…”

  12. Huey

    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!

  13. Ben Galbraith

    Worked for me

  14. It worked for me! Thanks!

  15. Hansjuerg Wuethrich

    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 ?

  16. Dennis

    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

  17. Hansjuerg Wuethrich

    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 :-(

  18. @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.

  19. Hansjuerg Wuethrich

    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 !

  20. Matt

    Hi Jeff,

    After installing iTunes 10 I also have the problem of sdk version constantly “loading…”. I ran the “prereq.py package” in terminal and here is the output:
    http://pastie.org/1142653

    Please help. Thanks!

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

  21. Matt

    @Jeff You’re right, I was in the wrong dir.

    Now with the patch applied it seems I can’t create new Mobile projects:
    http://skitch.com/mattmcq/dicey/titanium-developer-1.2.1

    Desktop lets me create new projects just fine (in the same dir). Thanks for your help!

  22. @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.

  23. Matt

    @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

  24. Hansjuerg Wuethrich

    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 !

    http://www.youtube.com/watch?v=xalLIrT2Shc

    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) :-)

  25. Hansjuerg Wuethrich

    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$

  26. Hansjuerg Wuethrich

    Aehmm.. Psstt!! i know, it is not cool to write 3 comments in a row.
    But please let me copy and paste this for a last time today ! Thank you !

    http://pastie.org/1143480

  27. @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.

  28. Hansjuerg Wuethrich

    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 :-)

    OVER AND OUT !!

    *PROBLEM SOLVED* !!

  29. @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!

  30. Hansjuerg Wuethrich

    No no!! you don’t have to say “SORRY” i have to say “THANK YOU !!” :-)

    So good night “here is after midnight :-)

  31. Musa Ulker

    Hello Jeff,

    I’m getting trouble for applying patch. The version screen is stuck with endless “Loading”.

    Here is the output of the prereq.py:

    http://gist.github.com/569854

    How can I solve it?

    Thanks

  32. Musa Ulker

    Well, its interesting. I have replaced file but it looks like its not updated.. Its working now. Thanks

  33. Gyasi

    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.

  34. Brian

    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

  35. Gyasi

    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.

Sign up for updates!

Become a mobile leader. Take the first step to scale mobile innovation throughout your enterprise.
Get in touch
computer and tablet showing Appcelerator software
Start free, grow from there.
0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Email -- 0 Flares ×