简体   繁体   English

进入主屏幕时,Xcode与模拟器或设备断开连接

[英]Xcode disconnecting from simulator or device when going to homescreen

I'm trying to debug an handoff issue in Xcode, but the debugger disconnects every time I go to the device homescreen. 我正在尝试调试Xcode中的切换问题,但是每次我进入设备主屏幕时,调试器都会断开连接。 This happens on both the simulator and an actual device. 这在模拟器和实际设备上都会发生。

I have other apps where it works correctly; 我还有其他可以正常运行的应用程序; that is, it continues to debug when I go to the homescreen. 也就是说,当我转到主屏幕时,它将继续调试。

Any ideas what could be causing this? 任何想法可能是什么原因造成的? I've rebooted Xcode and my Mac with no luck. 我已经重新启动了Xcode和Mac,但是没有运气。

When running on the device, the log has a message that looks like: 在设备上运行时,日志中的消息如下所示:

Jun 28 16:36:31 Mikes-iPhone com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-340.3.124
    [14593] <Warning>: 1 +0.000000 sec [3901/1307]: error: ::read ( -1, 0x16e246a38, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Jun 28 16:36:31 Mikes-iPhone com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-340.3.124
    [14593] <Warning>: Exiting.
Jun 28 16:36:31 Mikes-iPhone mediaserverd[14247] <Notice>: '' com.zzzzzz.appname(pid = 14594) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None

I'd appreciate any ideas or suggestions.... 我将不胜感激任何想法或建议。

Well this was dumb. 好吧,这很愚蠢。 At some point I had changed the "Application does not run in background" plist flag to YES. 在某些时候,我已经将“应用程序不在后台运行” plist标志更改为“是”。 Simply changing to NO fixed the problem. 只需更改为NO即可解决此问题。 Duh. 咄。

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

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