17

No app can run in my simulator, although building is good.

Error messsage is below:

Unable to run app in Simulator

An error was encountered while running (Domain = NSPOSIXErrorDomain, Code = 3)

Community
  • 1
  • 1
JackZeng
  • 191
  • 1
  • 2
  • 8
  • This might be under NDA. I suggest checking the Apple Developer Forums. – bsarrazin Jun 15 '14 at 20:13
  • 2
    restart xcode and simulator, reboot mac if that doesn't help – CodeSmile Jun 15 '14 at 21:58
  • 1
    @bensarz I change the version of simulator from 8 to 7.1, now it works fine...I can't find the same error code in ADF.. – JackZeng Jun 16 '14 at 06:22
  • @LearnCocos2D It didn't work...opps – JackZeng Jun 16 '14 at 06:23
  • @JackZeng have you tried resetting the simulator? (all versions) – bsarrazin Jun 16 '14 at 13:20
  • @bensarz Yes,I had tried this way, it did not works for me. The only way is changing the version of simulator. PS: I have not a developer account, so I can not use ios8 simulator, is this the reason? – JackZeng Jun 17 '14 at 23:54
  • @JackZeng That's an interesting question. It is unlikely that that is the problem. I have a test application which defines "none" as the team in the build settings and I am able to use the iOS simulator just fine. Do you have the project hosted somewhere I can download and play around? – bsarrazin Jun 18 '14 at 16:39
  • @bensarz In fact, even I build an empty project, it still can not work. but in 7.1, it is fine....I will update Xcode beta2 version, have a try later. – JackZeng Jun 19 '14 at 17:02
  • 1
    Where did you get the Xcode beta version from if you don't have a developer account? – Tim Jul 18 '14 at 09:34
  • I had the same issue, completely exiting Xcode and pulling it back up fixed it. – Stephen Donnell Jul 25 '14 at 02:46

12 Answers12

11

In my case, I tried to run the app on a iPhone 6 simulator when I got this error. Quitted the simulator only and re-ran the app on iPhone 5s (8.1) - it worked fine.

After a while I changed the target back to iPhone 6 (without quitting it), and ran the app against it - no error shown.

Display Name
  • 4,502
  • 2
  • 47
  • 63
9

As mentioned in the Xcode 6.1 Release Notes and in my sticky post in the Apple Developer Forums for the iOS Simulator, this is a known bug in iOS.

Upon installation of an app, SpringBoard will SIGKILL that app's process in order to force a relaunch of the app with the new executable. The problem is that there is a race condition whereby SpringBoard may accidentally SIGKILL a new process that we just launched rather than the old process. Which of the various error messages you get depends on exactly when in the launch process the SIGKILL was delivered. Normally, this shouldn't happen, so the advise is to just try again (sorry =/). If you find that this happes to you all the time or more frequently than you can tollerate, we are incredibly sorry. We are aware that systems with slower disk I/O will see this happen more frequently than faster systems, so if you are using an NFS home directory, you may want to create a local directory for your simulator data and setup a simlink to it from ~/Library/Developer/CoreSimulator

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
6

By Quitting the Simulator and Run the application worked for me.

Loganathan
  • 1,697
  • 1
  • 13
  • 17
5

For me , just Reset Content and setting in your simulator

Mina Fawzy
  • 20,852
  • 17
  • 133
  • 156
4

Restart Mac can solve the problem for me.

jianpx
  • 3,190
  • 1
  • 30
  • 26
0

This error is less severe than "Domain = DTiPhoneSimulatorErrorDomain, Code = 2" error that I had when I switched to Xcode 6.

For this one, I just reset and cleared contents on my Simulator...quit. Rebuilt and ran my app...and it works.

0

Every time this has happened to me (as of this writing, still happening on Xcode 6.1) I do not need to restart my mac to fix it. Instead I only had to restart the simulator. I exit the simulator by right-clicking on its icon in the tray and selecting the option to Quit. The I re-run my app and the simulator starts from scratch and runs my app with no error. Much quicker than re-starting the mac.

iCMS
  • 489
  • 4
  • 9
0

Well, I had the same error popping up, but since I force quitted the simulator then ran the project again I got it fixed and running fine. Hope that helps you :)

xdevx
  • 75
  • 8
0

If this error occurs with ionic framework, make sure you have an app id given in your config.xml

sgotre
  • 405
  • 3
  • 18
0

This is a generic error which says that it is unable to launch the app. The real error is in the log file. Go to the Simulator menu, Debug / Open System Log. Then press Reveal button to open the folder with actual Simulator logs. In my case it was CoreSimulator.log.

Here you will find the real error. My error was Could not register service com.apple.gputools.agent.producer.sim .

After a lot to struggle and trying all suggestions for half a day, I just went to simulator menu and chose File / GPU Selection / Use External GPU when available. That's it.

Gautam Jain
  • 6,789
  • 10
  • 48
  • 67
-1

please download new xcode_6 beta 4. your project will work in simulator. As i have tested as well.

Nirav Jain
  • 5,088
  • 5
  • 40
  • 61
-1

Sometimes the beta version of XCode is wrongly configured to use the command line tools from the previous xcode version. This solution should fix the issue for you : https://stackoverflow.com/a/25415781/512504

Community
  • 1
  • 1
mbritto
  • 898
  • 12
  • 25