2

Whenever I try to run an application from Xcode it displays an error message:

Simulator in use

This happens even though the simulator is not running. I force quit the simulator process from Activity Monitor, but it shows that message again and again.

If I quit and reopen Xcode it will work without error, but is there any solution other than closing Xcode?

Specification:

Most of answer showing me that you have to quit Xcode or restart Xcode. If there is a scenario when you are a middle of complex situation (like undo and redo code). In this situation if you close Xcode you are not able to undo the last modified code (Not talking about SVN commit). So i would like to know how to resolve it with out closing Xcode.

I'm running Xcode 5.1.1 (5B1008) on OS X 10.9.2

Kampai
  • 22,848
  • 21
  • 95
  • 95
  • I assume the simulator works ok the first time you run it after starting Xcode. How do you close the simulator after you've run your app? Why do you close it at all? – nohillside Aug 03 '14 at 09:13
  • If i switch simulator 6.1 to simulator 7.0 then i quit xcode and try to run from xcode it shows this message. – Kampai Aug 03 '14 at 09:36
  • @Andrew Barber: I have explain what needs to be there in question. I think you should put on hold 50% of SO question, if it is so. – Kampai Nov 07 '14 at 06:14

4 Answers4

0
  1. Open up your terminal.
  2. Get the pid of the simulator using the following command. ps -e | grep "Xcode.*iPhone Simulator"
  3. Now kill the process with the Unix kill command and the pid you got from the earlier step.
ardatt1155
  • 74
  • 4
  • That is what i have done using Activity Monitor too and also tried your solution. it will kill Simulator process. But actual problem here is simulator is not running than also it shows a message like this. I have double checked for any running process of simulator. – Kampai Jul 23 '14 at 10:52
  • Same problem as Kampai had here. – Andrei Konstantinov Jul 27 '15 at 10:30
0

Quit Xcode. After a while the simulator should again work.

freytag
  • 4,769
  • 2
  • 27
  • 32
  • Ya thats the only solution i have and i mention it in my question. Is there any other alternative for that? – Kampai Jul 24 '14 at 05:38
0

Finally i found the solutions for above issue:

Two solutions are there:

First: Simple one solution

It happens when you have multiple instance running of Xcode. Check all instance of Xcode one of them showing that project running state (Even if your simulator is close). Click on Stop button of that Xcode instance will resolve this issue.

AGAIN !! You do not need to close Xcode.

Second: Complex one solution

If first solution does not work than follow this solution.

Activity monitor not showing any simulator process is running. Still the message shows "Simulator in use".

Its true, simulator process is not in a memory but other application is utilise it.

Like in my case i use to open many instances of Xcode. So there are instance of your application and other demo app or any third party app also.

So i did found that one of the third party application is use simulator even if i "Quit" simulator. That's why its keep saying that "Simulator in use". Shown in below image

enter image description here

The process AMSlideMenu is a third party control is used (i mean its Xcode instance is running). I just quit this process and message won't appear any more.

I am not saying that it is issue from AMSlideMenu. It is issue from Xcode environment, Sometimes one of its instance is keeping simulator process in use even if we quit Simulator.

Hope this will help any one who still facing this kind of issue, And not willing to quit Xcode to over come of this issue (because you are in middle of something and its not feasible to quit Xcode that time). :)

Kampai
  • 22,848
  • 21
  • 95
  • 95
-1

try to right click on the IOS simulator icon on your dock and click Exit

LS_
  • 6,763
  • 9
  • 52
  • 88