iPhone Simulator Can't Be Lauched?

2019-06-14 21:00发布

When I press Run on Xcode with other tasks already running, the following message appears:

Simulator in Use. The Simulator can't be launched because it is already in use.

I checked with some friends and when they press run, Xcode automatically stop the tasks running and run the app you want. How can I configure this here?

Thanks in advance,

14条回答
Fickle 薄情
2楼-- · 2019-06-14 21:35

In most cases Josh answer solves this problem. But just now happened to me to have only one project in Xcode and trying to clean and built it did nothing. For me (this time) the solution was to:

  1. Right click the simulator from dock and click Quit.
  2. I did the same for Xcode (right click on Xcode in Dock and clicked Quit).
  3. After that just re-open Xcode and voila!

It works!!!

查看更多
疯言疯语
3楼-- · 2019-06-14 21:36

The over attached debugger syndrome

This happens to me when I switch simulator type (ios version or device type) without pressing the stop button (application was still running on it). To fix this, switch back to the old one (if you remember witch it was :P), run then stop the application, switch to the desired simulator configuration, run, tadaaaa: the error is gone.

This can also happen if you have two projects and one is running, and you try to run the other one. The solution is to stop the other one before starting the desired one.

This ca also happen if you had some kind of crazy bug and the simulator is unresponsive, in this case the debugger remains attached, crying over it's beloved simulator. You have to close the xcode simulator and sometimes restart for this one.

I have the latest xcode version at this time and got fustrated for a while. Now I'm free from restarting the simulator, xcode, coputer, router, going to sleep and waking up the next morning... :D

Hope this helps you guys apple has a lot of weird unclassified exceptions in xcode. They could least say that the debugger is still atached to something in the memory, we are programers not ordinary users, the more errors you give us the better we understand how to avoid them.

My personal favorite si when xcode puts absolute paths to your newly added famework that go nuts triing to find out why it doesn't work on an other computer (The project in wonderland syndrome).

(and rant rant rant irony rant.. you get the idea)

查看更多
Emotional °昔
4楼-- · 2019-06-14 21:37

If you have two projects open in Xcode and one is running on the simulator, you can't run the other. Go through each project window and see if any are running, and if they are, press the "Stop" button on the top left:

enter image description here

查看更多
一夜七次
5楼-- · 2019-06-14 21:40

Two Possibilities. 1)just quit the simulator,and run the application you want to run 2)just stop the application that using the simulator and run the application you want to run

查看更多
何必那么认真
6楼-- · 2019-06-14 21:43

To get the simulator to stop whatever is running you need to check off the box "Do not show this message again".

Example:

enter image description here

And then click the box.

enter image description here

And then you can run the simulator even if a program had already been running.

查看更多
地球回转人心会变
7楼-- · 2019-06-14 21:44

Try these steps in increasing order of persistence of the problem:

  1. Quit the Simulator.
  2. Clean the project, Reset Simulator, Delete 'Derived Data'.
  3. If nothing works, Force Quit Xcode and Simulator from the Mac Menu.

Force Quitting Xcode seems to always work for me.

It was one sticky Xcode bug indeed. Now it's solved, happy coding!

查看更多
登录 后发表回答