问题描述
当我断开将iMac连接到iPhone的电线时,我构建并发送到手机的任何应用程序突然崩溃,并且也没有任何内容发送到控制台.我在计算机屏幕上看到的唯一一件事是有关断开连接的标准警告,应该再次将其恢复.
All of a sudden any app I build and send to my phone crashes immediately when I disconnect the wire connecting my iMac to my iPhone and nothing gets sent to the console either. The only thing that I get on the computer screen is the standard warning about the disconnection and that it should be restored again & how.
不知道我做错了什么.一切都是最新的.该手机最近从Swift 1.2升级到2.0,运行iOS 9.1,iMac(虽然很旧)也在OS X El Capitan上.升级后几天,一切都正常.我已经尝试过重新启动Xcode,重新启动计算机和电话,删除和重建进程,删除应用程序并再次重新加载它,清理项目以及更改线路和电话.另外,这与现有项目没有任何关系,我只是创建了一个全新的愚蠢的页面视图,上面只有一个文本字段,当我断开连接时,事情就崩溃了.我想我可能已经绊倒了某个设置或类似的设置.帮助!!
Don't know what I did wrong. Everything is up to date. Upgraded recently from Swift 1.2 to 2.0, the phone is running iOS 9.1, the iMac (although old) is also on OS X El Capitan. Everything worked fine for a few days after the upgrade as well. I already tried restarting Xcode, restarting the computer and the phone, deleting and rebuilding the process, deleting the app and reloading it again, cleaning the project and changing both the wire and the phone. Also, this doesn't have anything to do with existing projects necessarily, I just created a brand new silly one page view with a single text field on it and the thing crashes on me as soon as I disconnect the wire. I think I may have tripped a setting or something similar. HELP!!
推荐答案
这是正常现象.当您在设备上构建并运行时,您仍在Xcode中运行.当您拉线时,您将断开Xcode与它正在运行的应用程序之间的连接.
This is normal behavior. When you build and run on the device, you are still running in Xcode; when you pull the wire, you break the connection between Xcode and the app that it is running.
正确的做法是在设备上构建并运行,以便将应用程序安装到设备上,然后停止(产品>停止).现在断开连接;这是安全的,因为该应用程序未运行.现在,通过在跳板上点击其图标,从设备启动该应用.
The correct thing to do is build-and-run on the device, in order to get the app onto the device, and then stop (Product > Stop). Now disconnect; this is safe because the app is not running. Now launch the app from the device, by tapping its icon in the springboard.
这篇关于断开连接后所有应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!