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条回答
太酷不给撩
2楼-- · 2019-06-14 21:47

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

查看更多
趁早两清
3楼-- · 2019-06-14 21:49

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.

查看更多
祖国的老花朵
4楼-- · 2019-06-14 21:52

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

查看更多
啃猪蹄的小仙女
5楼-- · 2019-06-14 21:53

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.

查看更多
姐就是有狂的资本
6楼-- · 2019-06-14 21:56

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

查看更多
来,给爷笑一个
7楼-- · 2019-06-14 21:56

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!

查看更多
登录 后发表回答