ios iOS模拟器未启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29296360/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 05:22:50  来源:igfitidea点击:

iOS simulator is not launching

iosxcodemacosios-simulator

提问by nitin.agam

I am face this problem again and again. Anybody can give the solution of this problem except reboot the Mac?

我一次又一次地面临这个问题。除了重新启动Mac之外,任何人都可以解决这个问题吗?

I have already tried these tricks

我已经尝试过这些技巧

  1. simulator-->services-->a reset content and settings,
    closing xcode and re-opening
    xcode --> developer toos --> simulator -->(open the simulator),
    quit simulator Activity monitor -->(the simulator is closed so nothing here to force close)

  2. First of all quit your simulator.
    And then quit and restart Xcode.
    And then run your project.

  3. Restart xcode and the simulator

  1. 模拟器-->服务-->重置内容和设置
    关闭xcode并重新打开
    xcode-->开发者工具-->模拟器-->(打开模拟器)
    退出模拟器 活动监视器-->(模拟器是关闭所以这里没有强制关闭)

  2. 首先退出你的模拟器。
    然后退出并重新启动Xcode。
    然后运行你的项目。

  3. 重启 xcode 和模拟器

回答by Ratul Sharker

I also have this issue and googled this, which redirect to this question. Mine was xcode10What i have done is as follows

我也有这个问题并用谷歌搜索了这个,它重定向到了这个问题。我的是xcode10我所做的如下

  1. Quit the simulator & Xcode.
  2. Opened Activity monitor, selected cpuoption and search for sim, killing all the process shown as result.
  3. Then fired up the terminal and run sudo xcrun simctl erase all. It will delete all content of all simulators. By content if you logged in somewhere password will be gone, all developer apps installed in that simulator will be gone.
  1. 退出模拟器和 Xcode。
  2. 打开Activity monitor,选择cpu选项并搜索sim,杀死所有显示为结果的进程。
  3. 然后启动终端并运行sudo xcrun simctl erase all。它将删除所有模拟器的所有内容。根据内容,如果您在某个地方登录密码将消失,则安装在该模拟器中的所有开发人员应用程序都将消失。

Doing these resolved my issue. Hope it helps.

做这些解决了我的问题。希望能帮助到你。

回答by swapnilagarwal

Under Product -> Scheme -> Edit Scheme, check these settings once.

在 下Product -> Scheme -> Edit Scheme,检查一次这些设置。

Edit scheme window screenshot

编辑方案窗口截图

回答by Mikhail Vasilev

None of the above solutions helped me.

上述解决方案都没有帮助我。

I also tried

我也试过

sudo killall -10 com.apple.CoreSimulator.CoreSimulatorService

And even after clean Xcode reinstallation my simulators continue closing after launching.

即使在干净的 Xcode 重新安装后,我的模拟器在启动后继续关闭。

So i removed all simulators from Window - Device & OrganizersRemove all simulators

所以我从Window - Device & Organizers 中删除了所有模拟器删除所有模拟器

And then added new one's

然后添加了新的

Add new simulators

添加新模拟器

And the problem has gone

问题已经解决了

回答by Tasawar Hussain

In my case tmpdirectory was not there for some reason, creating it giving adequate permissions saved my day.

在我的情况下tmp,由于某种原因目录不存在,创建它给予足够的权限节省了我的一天。

sudo mkdir /private/tmp
sudo chmod 1777 /private/tmp

https://stackoverflow.com/a/48075384/6919038

https://stackoverflow.com/a/48075384/6919038

回答by Khawla ali

The following solved my issue

以下解决了我的问题

  1. Open edit scheme
  1. 打开编辑方案

Open edit scheme

打开编辑方案

  1. Check that lunch is automatically
  1. 检查午餐是否自动

Check that lunch is automatically

检查午餐是否自动

回答by Vipin Johney

In Xcode select Product > Scheme > Edit Scheme > Run > Optionstab.

在 Xcode 中选择Product > Scheme > Edit Scheme > Run > Options选项卡。

Confirm Launch due to a background fetch eventis not selected.

确认 Launch due to a background fetch event没有选择

See the image below ...

看下图...

enter image description here

在此处输入图片说明

回答by Abhishek Bedi

Long shot but in my case I just moved my Xcodeto Applicationsand restarted Xcode.

远射,但在我的情况下,我只是将我移动XcodeApplications并重新启动Xcode

回答by Narasimha Nallamsetty

Enable/change location in the xcode console. It worked for me.

在 xcode 控制台中启用/更改位置。它对我有用。