我刚刚升级到Xcode 4,由于某种原因,我的应用程序无法在模拟器或iOS设备上运行。它在Xcode 3中工作得很完美,但现在当我按下运行时,程序突然停在“附加到…”似乎也没有任何其他信息可以帮助解决这个问题。

总的来说,你可以尝试以下方法来解决这个问题:

重新启动模拟器。 确保你没有包含信息。plist文件在你的构建阶段->复制捆绑资源。 Resources文件夹作为文件夹引用添加到项目中(蓝色文件夹图标)。这导致了问题,在将文件夹作为一个组添加后,问题就消失了。


当前回答

I was having this very annoying issue since a long time too. I've 3 different XCode versions installed and I'm not sure whether it's the reason or not that none of the above solutions worked for me. But here is the solution I finally found: I don't kill the running Simulator, I just try to launch it again using a Spotlight search, enter "Simu" and you should find it in Applications, then hit Enter. As it's yet running it will magically start my app that was frozen/locked/waiting for attachment. It works perfectly for me now and I hope it will also work for some (all?) of you.

顺便说一句,我用Cmd+空格来调用Spotlight,这样就可以非常快速地解冻模拟器而不使用鼠标。

其他回答

以下是我们的解决方案:

在项目>编辑方案>运行。

将调试器从GDB更改为None(正位于上图中绿色圆圈的上方)。

我尝试了这个页面中的所有方法,对我有效的“新”解决方案是进入模拟器,在iOS模拟器主菜单中“重置内容和设置”。

在我的新项目中合并了另一个项目后,我遇到了这个错误。确保你删除了你已经添加的项目信息。Plist和。app

我什么都试过了,都没用。我有一个XCode 3的旧项目。我只是重命名了info。Plist在项目的另一个名字,重新启动模拟器,一切都是正常工作以来。

Xcode 4.6.3更新(2013年6月13日)解决了以下问题:

在OS X 10.8.4上的iOS模拟器中调试时挂起。13722320

https://developer.apple.com/library/mac/#releasenotes/DeveloperTools/RN-Xcode/

你可以尝试更新你的Xcode,看看这是否适合你。安装新的XCode版本并重新启动XCode后,问题就解决了。