xcode 失去与 iOS 8 模拟器的连接

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25096642/
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-09-15 05:19:11  来源:igfitidea点击:

Lost connection to iOS 8 simulator

iosxcodeios8ios-simulatorxcode6

提问by Yury Bogdanov

I have a problem using Xcode 6 beta 4 and iOS 8 simulator. Each time I try to run my project Xcode sends me a "Connection lost" error. I tried to delete and create new simulator, set Command Line Tools for Xcode 6 and still nothing happened. what should I do?

我在使用 Xcode 6 beta 4 和 iOS 8 模拟器时遇到问题。每次我尝试运行我的项目时,Xcode 都会向我发送“连接丢失”错误。我试图删除并创建新的模拟器,为 Xcode 6 设置命令行工具,但仍然没有任何反应。我该怎么办?

Screenshot

截屏

采纳答案by Itachi

Just try to "Reset the content and Settings..." in iOS Simulator, it works for me. Currently my Xcode version is 6.0 (6A313).

只需尝试在 iOS 模拟器中“重置内容和设置...”,它对我有用。目前我的 Xcode 版本是 6.0 (6A313)。

This should be a known bug of iOS Simulator after searching, you could try the above the solution to fix it temporarily. Good luck!

经过搜索,这应该是iOS模拟器的一个已知bug,您可以尝试上面的解决方案暂时修复它。祝你好运!

UPDATE: Before you try to reset the iOS Simulator, just quit (cmd + Q) and launch it, I found it works good in my simulator/xcode 6.1.1, too.

更新:在您尝试重置 iOS 模拟器之前,只需退出 (cmd + Q) 并启动它,我发现它在我的模拟器/xcode 6.1.1 中也运行良好。

回答by Ramdhas

Simply Re-Run your project. No need to do any other step.

只需重新运行您的项目。无需执行任何其他步骤。

回答by Jeremy Huddleston Sequoia

As indicated in my post on the iOS Simulator dev forums (https://devforums.apple.com/thread/248879?tstart=0), this is one way in which a timing bug (failing race condition) exhibits itself. The only real workaround at this point is to just retry. Resetting contents and settings or rebooting is not really relevant.

正如我在 iOS 模拟器开发论坛 ( https://devforums.apple.com/thread/248879?tstart=0)上的帖子中所指出的,这是计时错误(失败的竞争条件)表现出来的一种方式。此时唯一真正的解决方法是重试。重置内容和设置或重新启动并不真正相关。

回答by rocket101

The reason this happens is precisely one issue - the version of xcode you have is a beta, and this is a known bug.

发生这种情况的原因恰恰是一个问题 - 您拥有的 xcode 版本是测试版,这是一个已知错误。

A couple things to try to get it to work,

尝试让它发挥作用的几件事,

  1. Restarting the Xcode and computer. For some reason, the bug pops up less frequently in my experience after the above steps are taken.

  2. Ignore it. The app will sometimes run just fine, despite the error.

  3. Redownload the dev tools. This might make it work if you have a corrupt version causing the bug to be more prevalent.

  4. Wait for it to be fixed. It is still beta software - it should be fixed soon. Hopefully.

  1. 重新启动 Xcode 和计算机。出于某种原因,在采取上述步骤后,根据我的经验,该错误弹出的频率较低。

  2. 忽略它。尽管出现错误,该应用程序有时会运行得很好。

  3. 重新下载开发工具。如果您的版本损坏导致错误更加普遍,这可能会使其起作用。

  4. 等待它修复。它仍然是测试版软件 - 应该很快修复。希望。

Hope this helps!

希望这可以帮助!

回答by barfoon

Rebooting my device fixed the issue for me

重新启动我的设备为我解决了这个问题

回答by Jayprakash Dubey

This happens less frequently in Xcode 6.1 as compared to Xcode 6 beta version. Only solution is to Re-run your project. This seems to be bug and might be fixed in upcoming Xcode 6.2 version.

与 Xcode 6 beta 版本相比,这种情况在 Xcode 6.1 中发生的频率较低。唯一的解决方案是重新运行您的项目。这似乎是错误,可能会在即将发布的 Xcode 6.2 版本中修复。

This still occurs in Xcode 6.2.

这仍然发生在 Xcode 6.2 中。

回答by mgarciaibanez

As per my experience nothing worked but using iOS V7.1

根据我的经验,除了使用 iOS V7.1 没有任何效果

After restarting the simulator, and even the Mac the error persisted, so i had to download iOS V7.1 simulator and after that connection worked as expected with this version

重新启动模拟器后,甚至 Mac 错误仍然存​​在,所以我不得不下载 iOS V7.1 模拟器,并且在这个版本的连接按预期工作之后