iPhone Simulator Can't Be Lauched?
Asked Answered
R

14

30

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,

Rexer answered 30/10, 2011 at 20:46 Comment(4)
Quit Xcode. Quit the simulator. Then restart each one and try again.Lonnylonslesaunier
Entirely QUIT the Simulator - don't start it manually but let Xcode start it for you.Vivie
I find if you remember to press the Stop button before you press the Run button you run into this problem a lot less than if you just hit the Run button.Brumby
I've been pressing the Stop button before press Run but, why everybody just press Run and it works and to me doesn't? I tried to close xCode and iPhone Simulator and open again and didn't work. I know this is not a big problem, but I just want to understand why just pressing Run doesn't work to me.Rexer
C
20

Quit the simulator and try again. if not working quit the Xcode and try again.

Cumulus answered 23/9, 2013 at 8:50 Comment(2)
First time quitting simulator didn't help me, but quitting the Xcode did. Strange thing...Pita
This works, but the initial problem seems like a bug to me. Pretty annoying to have to quit xcode every 30 minutes.Eldoraeldorado
S
10

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

Stowage answered 24/9, 2013 at 15:29 Comment(1)
Why the downvotes? This answer doesn't cover all cases, but it is perhaps the most annoying one. And as of Xcode 5.1.1, it hasn't been fixed. Please tell me what I can change.Stowage
D
4

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!!!

Destruction answered 19/3, 2014 at 14:3 Comment(1)
maybe because it's the same answer as the one from @CumulusGermane
L
3

If the issue is you have multiple projects open and running into Simulator conflicts, someone created a little Automator script that closes the current simulator and starts the next one. Kind of a work around but might work for you.

Check out the detailed answer here.

Loria answered 11/4, 2013 at 16:26 Comment(0)
M
2

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)

Manaker answered 24/5, 2014 at 16:50 Comment(0)
B
1

Quit the simulator and try again.

Bianca answered 8/12, 2012 at 9:59 Comment(1)
The question is "How can I configure (auto close) here?" not how to get it to run.Loria
C
1

Quit the xcode and simulator ,and try to restart your mac

Considerable answered 23/9, 2013 at 9:25 Comment(0)
V
1

Your mac might be opening iPhone Simulator automatically, In order to stop this you can run Terminal, OSX's version of command prompt, by navigating to ~/Applications/Terminal.app from there you can run these commands.

  1. top -u This command shows the mac's processes, and some information about them, from there you can see whether iPhone Simulator might be open.
  2. sudo killall iPhone\ Simulator Deconstructing this command for you, sudo puts you into superuser mode, by having you enter your login password, killall : This command kills all processes by the name specified. iPhone\ Simulator: This being the name of the app, and in order to have a space requires the \ (space) before the second word. By running this command you will kill all processes called iPhone Simulator.
  3. If this doesn't help, then try rebooting.
  4. If rebooting doesn't help try re-installing XCode.
  5. If re-installing XCode doesn't help, then try re-installing your Operating System entirely.

Good Luck!

Vivisect answered 29/9, 2014 at 5:13 Comment(0)
C
0

There are three solutions for this issue:

  1. Right click the simulator on the Doc, quit and then re-run the application from the Xcode.

If this did not work, then -

  1. Save your code, Right click the Xcode, restart the Xcode with your project and then run again. Remember to select simulator instead of device in the target.

If this also did not work, then,

  1. Force Close - Simulator/Xcode - Restart your mac and then run Xcode again.

Most likely - the first step would be enough!!!

Cedillo answered 26/9, 2014 at 11:26 Comment(0)
T
0

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.

Thoughtless answered 27/9, 2014 at 22:28 Comment(0)
M
0

I've been having this issue as well, but for me the problem doesn't have to do with XCode or Simulator.

The problem was in my code. A process was making the CPU run at 100%, and fixing the bug in my code fixed the simulator problem.

Maple answered 30/9, 2014 at 18:14 Comment(0)
A
0

Force Quit both, iOS Simulator and Xcode, then reopen Xcode and run project.

Abrade answered 24/11, 2014 at 13:31 Comment(0)
G
-1

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

Grapher answered 5/1, 2013 at 10:49 Comment(0)
F
-1

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!

Fendley answered 31/3, 2014 at 11:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.