“Simulator in use” error message shown even after

2019-01-20 15:21发布

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

4条回答
smile是对你的礼貌
2楼-- · 2019-01-20 15:42

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

查看更多
闹够了就滚
3楼-- · 2019-01-20 15:49

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). :)

查看更多
4楼-- · 2019-01-20 15:53

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

查看更多
该账号已被封号
5楼-- · 2019-01-20 15:54
  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.
查看更多
登录 后发表回答