Titanium Community Questions & Answer Archive

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

Cant run Titanium App in iPhone Simulator

I created sample Titanium app. I can able to build and run it in Android Emulator.But when i try to run the same in Iphone Simulator im getting following error.

Note : In Mac I have xCode 3.1.4,3.2.4 and 4.2 installed.

[INFO] One moment, building …
[INFO] Titanium SDK version: 1.8.1 (01/27/12 17:31 a24502a)
[INFO] iPhone Device family: universal
[INFO] iPhone SDK version: 5.0
[INFO] iPhone simulated device: iphone
[INFO] Performing full rebuild. This will take a little bit. Hold tight…
[INFO] Skipping JS compile, running from simulator
[ERROR] /Users/Admin/Documents/Titanium Studio Workspace/SampleTest/build/iphone/Classes/GDataXMLNode.h:39:9: fatal error: 'libxml/tree.h' file not found [2]
[ERROR]
[ERROR] Error: Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.1/iphone/builder.py", line 1286, in main
execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=LOGID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s %s" % (log_id,sdk_version,debugstr,kroll_coverage)],False)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.1/iphone/builder.py", line 1192, in execute_xcode
output = run.run(args,False,False,o)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.1/iphone/run.py", line 39, in run
sys.exit(rc)

May I know why this issue?
If its because of multiple xcode installed , Please let me know how to set default Xcode to be used by Titanium sdk.

I dont want to install these xcode since we need all these xcode version for some other native development.

Thanks in Advance,
Saamy

— asked February 29th 2012 by Saamy
  • build
  • ios
  • titanium
  • xcode
2 Comments
  • Which processor does have your macmini?

    Best,

    Mauro

    — commented February 29th 2012 by Mauro Parra
  • Hi Mauro,
    Its has Processor: 2.53 Ghz Intel Core 2 Duo

    — commented March 1st 2012 by Saamy

2 Answers

  • Check this http://developer.appcelerator.com/blog/2012/02/xcode-4-3-and-titanium.html

    — answered February 29th 2012 by Minh Nguyen
    permalink
    8 Comments
    • sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
      

      — commented February 29th 2012 by Minh Nguyen
    • Thanks for you reply Minh.

      I referred those links.

      By running this command "xcodebuild -version "
      i came to know xcode 4.2 is default xcode.

      I also tried this "sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer" command. But Im getting error,

      xcode-select: Error: Path "/Applications/Xcode.app/Contents/Developer" is not a directory.

      What command is this? Is it to switch xCode?

      Actually My xcode installed in this path "/Developer/XCode 4.2 with ios 5"
      Please let me know if I'm missing anything else

      Thanks in Advance,
      Saamy

      — commented February 29th 2012 by Saamy
    • sudo xcode-select -switch <xcode_folder_path>
      

      — commented February 29th 2012 by Minh Nguyen
    • Try this to determine xcode path

      sudo xcode-select -print-path
      

      — commented February 29th 2012 by Minh Nguyen
    • When i run "sudo xcode-select -print-path" i got
      /Developer/XCode 4.2 with ios 5

      So i ran this command "sudo xcode-select -switch /Developer/XCode\ 4.2\ with\ ios\ 5"

      But still i have same issue

      — commented February 29th 2012 by Saamy
    • Have you ever run successfully before with iOS? Did you try the simplest app.js with just alert(&#39;hello&#39;);?

      — commented February 29th 2012 by Minh Nguyen
    • I just install Titanium in my Mac mini and trying to run Titanium app in iOS. No success in running Titanium app in iOS till now.

      I just created Titanium Mobile project. I didn't modify anything app.js.

      — commented February 29th 2012 by Saamy
    • Run command

      sudo xcode-select -switch '/Developer/XCode 4.2 with ios 5'

      Path will set. Now restart your Titanium Studio

      — commented March 2nd 2012 by Wajid Ali
  • hello saamy,
    just remove all the content lies under the iphone folder and then rebuild the application

    — answered February 29th 2012 by Mitul Bhalia
    permalink
    5 Comments
    • Thanks Mitul for you reply.

      Which iPhone folder content you want me to remove.

      I tried removing Titanium app's Resource/iPhoen fodler content and also

      build folder which is available in Titanium project folder.

      But no luck :-(

      — commented February 29th 2012 by Saamy
    • yes that is right way to fully rebuild the app …

      but not to delete the build folder…

      — commented February 29th 2012 by Mitul Bhalia
    • But still I cant run Titanium app in iOS emulator.

      I have xCode 3.1.4,3.2.4 and 4.2 installed. Is there any problem in havingDifferent xcode in Mac?

      — commented February 29th 2012 by Saamy
    • ok, i think no….

      you can do one thing… uninstall titanium studio and reinstall it after that just create a new project and run in the iPhone simulator

      — commented February 29th 2012 by Mitul Bhalia
    • Thanks Mutul,

      I tried uninstalling and installed Titanium studio again,created new Project and tried to run it in iPhone/iPad emulator.
      But same problem again :-(

      — commented February 29th 2012 by Saamy
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.