views:

9774

answers:

11

Problem statement:

Unlike people have asked at here and here

I got this error after a brand new installation of leopard(hackintosh), this problem really driving me crazy.... and nowhere else to find an clue, I googled and visited every article related with this, still cann't get it solved

After the first time install iPhone SDK 2.2.1, start a new project(any type, Navigate based, OpenGL ES application), then build and go, I got the following problem: sometime it's:

* Failed to launch simulated application: Unknown error.

and sometime it is:

* Failed to launch simulated application: iPhone Simulator failed to find the process ID of com.yourcompany.[your application name]

It seems that apps in the simulator crashed immediately, so Xcode can find the process ID.

the solution ?

This link says that this even cann't be solved:

Some others make a detailed step by step:

* Uncheck Info.plist
* quit XCode
* Delete directory /Lib/Caches/com.apple.DeveloperTools.###
* Open Xcode project
* Clean All Targets
* Rebuild

and I reset the iPhone Simulator. Also not solved the problem...

I've even tried uninstall the SDK and reinstall it, still got the same error...

Is this a problem related with hardwares? or the operating system version? I'm using hackintosh(iDenebv1.4 10.5.6), all other software works good including iTunes && vmware fusion.

Great thanks for any further tips or clues!

A: 

Is your CPU Intel, and, of a model distributed in Apple hardware?

I doubt the Simulator will work reliably (if at all) on non-Intel CPUs and/or in VMWare. The simulator is very CPU specific in order to reflect the arm hardware of the iPhone.

The SDK ONLY supports Intel hardware from Apple.

There is a significant effort involved in creating the simulator and it's not easy or cheap (read, thousands of man hours) to support every CPU.

nessence
yeah, I'm aware of that, people complaining many tricky problems on AMD CPUs, I choose Intel E5200:CPU:Intel E5200 board:EP43-UD3L memory:Kingston DDR2-800 2GB X2 Graphic:nvidia 9400GT
springrider
+1  A: 

found some wierd log in /var/log/system.log.

May  8 16:17:50 th084134 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/System/Library/CoreServices/SpringBoard.app/SpringBoard[1170]: MobileInstallationLookup: Generating the install map
May  8 16:17:50 th084134 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/System/Library/CoreServices/SpringBoard.app/SpringBoard[1170]: load_application_info: Could not load signer identity from /Users/test/Library/Application Support/iPhone Simulator/User/Applications/5D55807A-7489-4DC5-B4D7-2ECD5E230F29/new1.app/new1
May  8 16:17:50 th084134 [0x0-0x2e02e].com.apple.iphonesimulator[1168]: error compiling query "SELECT value FROM _SqliteDatabaseProperties WHERE key = ?;": no such table: _SqliteDatabaseProperties
May  8 16:17:51 th084134 SpringBoard[1170]: Unable to obtain task name port for com.yourcompany.new1. Either it failed to exec or it terminated immediately: (os/kern) failure
May  8 16:17:51 th084134 SpringBoard[1170]: Couldn't activate <SBApplication: 0x123e6d0> com.yourcompany.new1 activate: animated  deactivate: 
May  8 16:17:51 th084134 SpringBoard[1170]: Application <SBApplication: 0x123e6d0> com.yourcompany.new1 activate: animated  deactivate:  exited abnormally with signal 256: Unknown signal: 256
May  8 16:17:51 th084134 SpringBoard[1170]: Unable to obtain task name port for com.yourcompany.new1. Either it failed to exec or it terminated immediately: (os/kern) failure
May  8 16:17:51 th084134 com.apple.launchd[164] (UIKitApplication:com.yourcompany.new1[0xa455][1171]): Bug: launchd_core_logic.c:2812 (23714):103: sandbox_init(j->seatbelt_profile, j->seatbelt_flags, &seatbelt_err_buf) != -1
May  8 16:17:51 th084134 com.apple.launchd[164] (UIKitApplication:com.yourcompany.new1[0xa455][1171]): Sandbox failed to init: Cannot apply builtin profile `/Users/test/Library/Application Support/iPhone Simulator/User/Applications/5D55807A-7489-4DC5-B4D7-2ECD5E230F29.sb': Policy not found
May  8 16:17:51 th084134 com.apple.launchd[164] (UIKitApplication:com.yourcompany.new1[0xa455][1171]): Exited with exit code: 1
May  8 16:17:51 th084134 [0x0-0x2e02e].com.apple.iphonesimulator[1168]: 2009-05-08 16:17:51.026 SpringBoard[1170:10b] Unable to obtain task name port for com.yourcompany.new1. Either it failed to exec or it terminated immediately: (os/kern) failure

Here is a discussion about how to run app in simulator via command line, hope it helps to understand how does xcode and simulator works.

But I didn't work it out.

Well, I "solved" it by install another distribution of hackintosh(IPC 10.5.6), works perfect!

springrider
A: 

I fixed this problem by removing the "Icon already includes gloss and bevel effect" property from the Info.plist file in my project.

While removing this didn't fix it for me, the problem did seem to start when I added the UIPrerenderedIcon property…
Amorya
A: 

My problem centered around a Product Name the simulator simply wouldn't accept. Picking alternative names got me past the problem. Changing the name back to the original suspect choked the simulator every time.

fbrereto
+2  A: 

FIXED For the issue: iPhone Simulator failed to find the process ID of com.yourcompany.[your application name]

I was having an issue building and simulating a project I built under OS Version 2.2.1, which I could no longer get to build and run in the simulator for XCode 3.1.4, even though I forced XCode to build for "Simulator - 2.2.1 Debug"

I was able to get past this problem by: - Close the iPhone Simulator - Putting XCode into View->Detail - Opening the "Info.plist" file in the "Resources" folder - Near the top of the file you should see "Info.plist" with and up/down arrow selector - Click on the up/down arrow selector - Select "Clear File History"

Built For: Simulator - 2.2.1

XCode Version: 3.1.4 (Which includes OS3.1 Beta 3)

I can confirm that closing the simulator and doing "clear file history" fixed this problem for me.
Matt Rix
A: 

Try moving the project to your local hard driver and opening it from there! That solved the issue for me (the project used to be stored on a samba share).

xastor
+1  A: 

Hi All, I had the same issue last night, and suddenly my system got reboot. At that moment, i was trying to install an application into simulator. When system returned, and i tried again to install the app, it said, "Failed to launch simulated application"

Than i did googled it, and tried many solutions, like cleaining all targets and try building again, but didn't worked out.

So i have found the following link, where it is described, how to reset the iPhone Simulator contents:

http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/125-Using_iPhone_Simulator/iphone_simulator_application.html

I tired doing it, and you guys would'nt believe me, it worked :) ,

Solution was : "To set the user content and settings of the simulator to their factory state and remove the applications you have installed, choose iPhone Simulator > Reset Content and Settings"

Best of Luck to all.............. :)

Ansari
A: 

In my case, I was adding a target to an existing app that had always worked. In my case, I had forgotten to select all the source code, xibs, frameworks, etc. and click their target checkbox. My clue was that the build happened instantaneously, which didn't make any sense. It never built anything. It just failed to install in the simulator. Once I included all the source files, etc., for the new target, then it built and installed fine.

Howard Cohen
A: 

I had the exact same problem - I reset the iphone simulator and then quit the simulator then started it again.

Worked.

Enjoy, Dario.

Dario
A: 

I had the same problem, I fixed it by launching the simulator through another app and deleting the app I was trying to run on it. Then try to build and run and worked perfect.

Cheers

Matt

Matt Nambot
A: 

This has happened to me twice. I simply deleted the app from the simulator (and/or device if you're attempting to run on your device) via the UI of the simulator, then shut the simulator down and attempted to re-run the app. This has worked for me both times. Doing the deletion of the actual files backing the simulator will also remove the app and do the same thing (but the deletion from the UI, if it works for you, is a little bit faster and easier).

Cary A. Bakker