简体   繁体   English

在 Xcode 6.0.1 中第一次失去与“iOS Simulator”的连接

[英]Lost connection to “iOS Simulator” for the first time in Xcode 6.0.1

When I run my iOS application in the Simulator for the first time in Xcode 6.0.1, I got this error message:当我在 Xcode 6.0.1 中第一次在模拟器中运行我的 iOS 应用程序时,我收到以下错误消息:

Lost connection to "iPad 2".与“iPad 2”的连接丢失。

Restore the connection to "iPad 2" and run "App Name” again, or if "App Name" is still > > running, you can attach to it by selecting Debug > Attach to Process > App Name.恢复与“iPad 2”的连接并再次运行“App Name”,或者如果“App Name”仍在 > > 运行,您可以通过选择“调试”>“附加到进程”>“应用名称”来附加到它。

错误消息的屏幕截图

Can any one suggest how I can solve this error message?任何人都可以建议我如何解决此错误消息? After I stop running and rebuild, everything works fine.在我停止运行并重建后,一切正常。

Follow 2 steps :遵循 2 个步骤:

1- sudo DevToolsSecurity -enable 2- Edit Scheme -> Run -> Debug excitable , uncheck this checkbox it will be ok ! 1- sudo DevToolsSecurity -enable 2- Edit Scheme -> Run -> Debug excitable ,取消选中此复选框就可以了!

You will now be able to run on simulator.您现在将能够在模拟器上运行。 This worked for me.这对我有用。

Same here.同样在这里。 I thinks that is the bug of XCode .我认为这是XCode的错误。

Just stop running and Run Again.只需停止跑步并再次运行即可。 This way is working fine for me.这种方式对我来说很好用。

This is a known issue with iOS 8.0 and earlier, but changes in iOS 8.0 make the issue more likely to occur than in past versions.这是 iOS 8.0 及更早版本的已知问题,但与过去的版本相比,iOS 8.0 中的更改使该问题更可能发生。

In addition to the lost connection message, other appearances of this bug will be an ESRCH error message (POSIX domain, 3 code), an FBS* domain with code 4, or your app getting SIGKILL and dropped to debugger.除了丢失的连接消息之外,此错误的其他表现还包括 ESRCH 错误消息(POSIX 域,3 代码)、带有代码 4 的 FBS* 域,或者您的应用获得 SIGKILL 并被丢弃到调试器。 I think there may be one more message for this bug, but those are the main 4 behaviors.我认为此错误可能还有一条消息,但这些是主要的 4 种行为。 Which one you gets depends on exactly what point in the launch you lost the race.你得到哪一个取决于你在发射的哪一点输掉了比赛。

At present, the workaround is just to retry Build&Run or launch the installed app in the sim and attach to the running process with the debugger.目前,解决方法只是重试 Build&Run 或在 sim 中启动已安装的应用程序,并使用调试器附加到正在运行的进程。

Reseting the simulator content and settings would solve the problem.重置模拟器内容和设置将解决问题。 From iOS Simulator drop down select Reset Content and Settings, after that build and run again.从 iOS 模拟器下拉菜单中选择重置内容和设置,然后构建并再次运行。 I hope that helps.我希望这有帮助。

This happens less frequently in Xcode 6.2 as compared to Xcode 6 beta version.与 Xcode 6 beta 版本相比,这种情况在 Xcode 6.2 中发生的频率较低。 Only solution is to Re-run your project .唯一的解决方案是重新运行您的项目 This seems to be bug.这似乎是错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM