3
votes

Try to start my project on one iOS8 simulator and Xcode shows error:

An error was encountered while running (Domain = NSMachErrorDomain, Code = 5) enter image description here

No one of iOS8 simulator can't be started. What to do?

5
Have you copied xcode from somewhere else? or have you downloaded a dmg and installed it? - Reno Jones
Download dmg from developer center - Maria
@Maria did a download from dev center help? - Nikita P
This problem was with Xcode6 beta2 from dev center. It was fixed in DP3 - Maria
I'm having the same problem using DP3. - Joseph Lin

5 Answers

3
votes

"iOS Simulator" -> "Reset Content And Settings..." ^ this helps.

3
votes

I ran into the same error just this morning, and I haven't completely figured it out, but I have observed something which might help you (or both of us, if anyone else stumbles across this and has more information). I was building a project which contained:

  • the app itself
  • a Today extension (widget)
  • a Framework to share code between the app and the widget

The widget comes with TodayViewController.h/m, and I wanted to share this view controller with the app. So I changed the target membership of TodayViewController.m to my framework rather than the widget. (Did this in the Target Membership in the right sidebar.) I also set the TodayViewController.h to be part of the framework as a public header. When I did this, and then did a clean, I got this error when trying to run the app in the simulator, and also an "unknown error (null)" when trying to run on device. If I set TodayViewController.m's target membership to both the framework and the widget, I'm able to run the app in the simulator just fine.

Now, I don't know why this would be the case. I've declared my widget to depend on the framework, so it seems like it should work without my setting the target membership of TodayViewController.m to both widget and framework. If anyone else knows why this is the case, I'm all ears. But this is what I've found so far.

1
votes

I had the same problem tonight too. I was not able to get my app to run if my resource directory was a "folder reference" (aka blue folder). Once I re-added my resource directory as a "folder group" (normal folder) instead my app ran fine. Not sure if this is the case for you, but it solved my problem. GL.

0
votes

I ran into the same problem today using DP3.

When I tried to delete the Derived Data folder from Organizer, it showed me some kind of permission error. I then manually deleted the folder from Finder, rebuilt, and voila! It worked!

0
votes

If you ever get and error like this, where xcode doesn't say much, just a error code, try first to check the actual problem on the system console.

Applications -> Utilities -> Console

On my case I was able to see that xcode was trying to copy the widget's binary and it was not able to find it. I was able to find out that without at least one compiled file on the extension's target, xcode is not going to create the binary for the extension.