Mobile SDK 1.5.1 failed to run on iOS 4.2 Simulator on OS X 10.6.6

I recently updated OS X to 10.6.6 and my Xcode version is 3.2.4 with iOS SDK 4.2. Now I can not run KitchenSink or even a newly created mobile project on iPhone Simulator.

Here is the console log on Debug level:

[INFO] Compiling moment
[INFO] No JavaScript errors detected.
[INFO] One moment, building ...
[INFO] Titanium SDK version: 1.5.1
[INFO] iPhone Device family: iphone
[INFO] iPhone SDK version: 4.2
[DEBUG] executing command: /usr/bin/killall iPhone Simulator
[DEBUG] No matching processes belonging to you were found
[DEBUG] finding old log files
[DEBUG] executing command: mdfind -onlyin /Users/Edward/Library/Application Support/iPhone Simulator/4.2 -name 3ba80496-3b04-4447-aeb6-e43c847cd9cc.log

Titanium Developer 1.2.2 would then hang at this point. When manually stopped, console showed additional messages:

[ERROR] Error: Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/", line 1040, in main
File "/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/", line 1021, in cleanup_app_logfiles
File "/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/", line 11, in run
line = unicode(proc.stdout.readline(), 'utf-8')

However, the same projects (e.g. KitchenSink or New project) would run fine under Android emulator (e.g. API 2.2).

Any idea what went wrong that caused iPhone Simulator to fail to launch? I'd appreciate any suggestions and recommendations.


2 Answers

  • Have you tried deleting everything in build/iphone?

    — answered 5 years ago by Justin Toth
    1 Comment
    • I also tried delete everything under build/iphone and rebuild again. The same problem (same console messages) still showed up.

      — commented 5 years ago by Edward Duh
  • I found the root cause of the problem. Somehow my metadata db was corrupted and I deleted indexes on all volumes and rebuilt the index:

    $sudo mdutil -i off /
    $sudo mdutil -avE

    Once the metadata database is cleaned. I can run KitchenSink in iPhone simulator as expected. Thanks!

    — answered 5 years ago by Edward Duh
    1 Comment
    • Edward

      It's great that you were able to resolve this. However, you shouldn't answer your own questions, as there is no way to close the post making it difficult for others to find the solution in future. Read Participating in the Q&A, which gives tips about how you can get more out of the Q&A.


      — commented 5 years ago by Paul Dowsett