Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Iphone sdk not found -you must have iPhone SDK installed. we cannot find it

When I try to create a new project using Tinanium 1.2.1 I get the following error window " you must have iPhone SDK installed. we cannot find it".
I dont know what to do further . Can you help please.

My software details

Developer Information:

Version: 3.2 (10M2262)
Location: /Developer
Applications:
Xcode: 3.2.3 (1688)
Interface Builder: 3.2.3 (788)
Instruments: 2.7 (2529)
Dashcode: 3.0.1 (330)
SDKs:
Mac OS X:
10.5: (9L31a)
10.6: (10M2262)
iPhone OS:
3.2: (7B405)
4.0: (8A306)
iPhone Simulator:
3.2: (7W367a)
4.0: (8A306)

Titanium 1.2.1

— asked July 27th 2010 by purushothaman loganathan
  • have
  • installed
  • iphone
  • must
  • sdk
  • you
1 Comment
  • I'm getting the same issue with Titanium 1.2.1, iPhone SDK 4.1, and OSX 10.6.4

    The Pythong script "/Library/Application\ Support/Titanium/mobilesdk/osx/1.4.1.1/iphone/prereq.py project"
    returns:
    {"success":true, "sdks":["4.1","3.2"],"ipad":true}

    But Titanium Developer complains that it is unable to find the iPhone SDK.

    — commented October 2nd 2010 by David Wheeler

7 Answers

  • Titanium Developer is running a python script in the background to determine which SDK versions you have installed. In order for our python script to detect the presence of Xcode, you must have the xcodebuild command on your system path. Typcially, a link is automatically created at /usr/bin/xcodebuild by the Xcode installer. You can check to see what Titanium is seeing by running python ~/Library/Application\ Support/Titanium/mobilesdk/osx/(SDK version)/iphone/prereq.py project.

    If this fails (and xcodebuild is not on your path), you will need to manually add /Developer/usr/bin to your path, or reinstall Xcode to have it properly configure your system path for you (the latter option might be better if possible, since I'm not 100% sure what else the Xcode installer does).

    — answered July 27th 2010 by Kevin Whinnery
    permalink
    1 Comment
    • executed the script and got the success response back . So I am not sure about the problem.
      Purushothaman-Loganathans-Mac-mini:iphone purush$ ./prereq.py project [DEBUG] executing command: xcodebuild -showsdks {"success":true, "sdks":["3.2","4.0"],"ipad":true}

      — commented July 28th 2010 by purushothaman loganathan
  • I executed the script and got the success response back . So I am not sure about the problem.

    Purushothaman-Loganathans-Mac-mini:iphone purush$ ./prereq.py project
    [DEBUG] executing command: xcodebuild -showsdks
    {"success":true, "sdks":["3.2","4.0"],"ipad":true}

    — answered July 27th 2010 by purushothaman loganathan
    permalink
    0 Comments
  • @Kevin: Slight error in your response which may confuse people:

    Please remove the "~" or tilde in this path which means relative to the user's root.
    ~/Library/Application\ Support/Titanium/…

    You really want the absolute path I think:

    /Library/Application\ Support/Titanium/…

    — answered August 17th 2010 by Ralf Pfeiffer
    permalink
    0 Comments
  • I am having the same problem. Running Snow Leopard and iTunes 10, just downloaded the latest iOS SDK 4.1 and Titanium 1.2.1, have tried the default 1.4.0 SDK and even the more recent 1.4.2, tried all the tricks from all the articles I could find on this subject (replacing the prereq.py script file, adding /Developer/usr/bin so xcodebuild could be found, updated all my certificates, deleting contents of my build directory, etc.), nothing seems to help. If I create a new project, it gives me the error the SDK can't be found, if I try to compile KitchenSink, it hangs on One moment, building.

    prereq.py seems to return a successful result:

    $ ./prereq.py 'KitchenSink'
    {"wwdr":true,"iphone_dist_name":["ABC, Inc."],"sdks":["4.1","3.2"],"iphone_dev_name":["Eric Alderman (JF9FHC69VG)"],"iphone_dist_message":null,"wwdr_message":null,"itunes_message":null,"itunes":true,"iphone_dev_message":null,"iphone_dev":true,"iphone_dist":true,"ipad":true,"itunes_version":"10.0"}

    This is pretty darn frustrating.

    Eric

    — answered September 20th 2010 by Eric Alderman
    permalink
    0 Comments
  • I am having the same problem. Running Snow Leopard and iTunes 10, just downloaded the latest iOS SDK 4.1 and Titanium 1.2.1, have tried the default 1.4.0 SDK and even the more recent 1.4.2, tried all the tricks from all the articles I could find on this subject (replacing the prereq.py script file, adding /Developer/usr/bin so xcodebuild could be found, updated all my certificates, deleting contents of my build directory, etc.), nothing seems to help. If I create a new project, it gives me the error the SDK can't be found, if I try to compile KitchenSink, it hangs on One moment, building.

    prereq.py seems to return a successful result:

    $ ./prereq.py 'KitchenSink'
    {"wwdr":true,"iphone_dist_name":["ABC, Inc."],"sdks":["4.1","3.2"],"iphone_dev_name":["Eric Alderman (JF9FHC69VG)"],"iphone_dist_message":null,"wwdr_message":null,"itunes_message":null,"itunes":true,"iphone_dev_message":null,"iphone_dev":true,"iphone_dist":true,"ipad":true,"itunes_version":"10.0"}

    This is pretty darn frustrating.

    Eric

    — answered September 20th 2010 by Eric Alderman
    permalink
    0 Comments
  • I am having the same problem. Running Snow Leopard and iTunes 10, just downloaded the latest iOS SDK 4.1 and Titanium 1.2.1, have tried the default 1.4.0 SDK and even the more recent 1.4.2, tried all the tricks from all the articles I could find on this subject (replacing the prereq.py script file, adding /Developer/usr/bin so xcodebuild could be found, updated all my certificates, deleting contents of my build directory, etc.), nothing seems to help. If I create a new project, it gives me the error the SDK can't be found, if I try to compile KitchenSink, it hangs on One moment, building.

    prereq.py seems to return a successful result:

    $ ./prereq.py 'KitchenSink'
    {"wwdr":true,"iphone_dist_name":["ABC, Inc."],"sdks":["4.1","3.2"],"iphone_dev_name":["Eric Alderman (JF9FHC69VG)"],"iphone_dist_message":null,"wwdr_message":null,"itunes_message":null,"itunes":true,"iphone_dev_message":null,"iphone_dev":true,"iphone_dist":true,"ipad":true,"itunes_version":"10.0"}

    This is pretty darn frustrating.

    Eric

    — answered September 20th 2010 by Eric Alderman
    permalink
    0 Comments
  • Got it to work by adding the Xcode unix tool directories to the $PATH. Just in case, here is a script that does it for you (instructions below)

    #!/bin/sh
    # based on git-osx-installer
    append_path () {
      input="$1"
      value="$2"
      if ! echo $input | /usr/bin/egrep -q "(^|:)$value($|:)" ; then
         if [ "$3" = "after" ] ; then
            echo $input:$value
         else
            echo $value:$input
         fi
      else
        echo $input
      fi
    }
    
    append_plist_var() {
      name="$1"
      append_value="$2"
      default_value="$3"
      current_value="`defaults read $HOME/.MacOSX/environment ${name}`"
      [ ! "$current_value" ] && current_value="$default_value"
      new_value="`append_path "$current_value" "$append_value" after`"
      defaults write $HOME/.MacOSX/environment "$name" "$new_value"
      if [ "$current_value" == "$new_value" ]; then
        echo "No change to $name in ~/.MacOSX/environment.plist"
      else
        echo "Variable $name in ~/.MacOSX/environment.plist changed from '$current_value' to '$new_value'"
      fi
    }
    
    append_plist_var PATH "/Developer/usr/bin" "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin"
    append_plist_var PATH "/Developer/usr/sbin" "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin"
    
    pushd "$HOME"
    
    popd
    
    1. Copy the code to a plaintext document.
    2. Save it as "add-xcode-path.sh" (for example).
    3. Open up Terminal and execute the script file: sh add-xcode-path.sh
    4. Log out from OSX, log in again and restart Titanium.

    Note: YOU MUST LOG OUT FROM OSX AND LOG IN AGAIN FOR THE PATH CHANGE TO TAKE EFFECT.

    It blows that Titanium Developer doesn't simply allow you to select an Xcode directory manually (like "/Developer").

    — answered October 8th 2010 by Nina Felixsson
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.