Xcode error: Failed to launch simulated applicatio

2019-01-23 18:00发布

Problem

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 can'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 sometimes it's:

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

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

Solution

This link says that this even can't be solved. Some others make a detailed step by step:

  1. Uncheck Info.plist
  2. Quit XCode
  3. Delete directory /Lib/Caches/com.apple.DeveloperTools.###
  4. Open Xcode project
  5. Clean All Targets
  6. Rebuild

and I reset the iPhone Simulator. This also didn't solve 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 a hackintosh (iDenebv1.4 10.5.6), all other software works good including iTunes && vmware fusion.

Great thanks for any further tips or clues!

17条回答
来,给爷笑一个
2楼-- · 2019-01-23 18:27

Simply delete 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 attempt to re-run the app. Doing the deletion of the actual files backing the simulator will also remove the app and do the same thing (but the deletion via the simulator's UI, if it works for you, is a little bit faster and easier).

查看更多
Explosion°爆炸
3楼-- · 2019-01-23 18:27

This was bugging me too but finally got it working. Unfortunately, I can't reproduce what I did it but here's my list of actions for your information.

The project causing the problem was one I'd downloaded from Apple and tweaked. Interestingly, I could still launch my own projects fine.

So, here's a list of actions that I did (note that none of the actions below worked just by itself): - closing the simulator and doing "clear file history" - restarting simulator - rebooting - restarting xcode - resetting the iPhone with Reset Content and Settings

However, by the time I'd tried all of the above with a fresh version of the code I'd downloaded - it was working again. Just out of interest, I dragged the project that was causing this problem back to the desktop and it was OK now.

查看更多
够拽才男人
4楼-- · 2019-01-23 18:29

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)

查看更多
对你真心纯属浪费
5楼-- · 2019-01-23 18:29

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

查看更多
够拽才男人
6楼-- · 2019-01-23 18:29

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

查看更多
看我几分像从前
7楼-- · 2019-01-23 18:32

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

查看更多
登录 后发表回答