“Simulator in use” error message shown even after simultor is not running [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-17 21:09:38

问题


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

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


回答1:


  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.



回答2:


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




回答3:


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

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:


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



来源:https://stackoverflow.com/questions/24907950/simulator-in-use-error-message-shown-even-after-simultor-is-not-running

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!