我刚刚升级到Xcode 4,由于某种原因,我的应用程序无法在模拟器或iOS设备上运行。它在Xcode 3中工作得很完美,但现在当我按下运行时,程序突然停在“附加到…”似乎也没有任何其他信息可以帮助解决这个问题。
总的来说,你可以尝试以下方法来解决这个问题:
重新启动模拟器。 确保你没有包含信息。plist文件在你的构建阶段->复制捆绑资源。 Resources文件夹作为文件夹引用添加到项目中(蓝色文件夹图标)。这导致了问题,在将文件夹作为一个组添加后,问题就消失了。
我刚刚升级到Xcode 4,由于某种原因,我的应用程序无法在模拟器或iOS设备上运行。它在Xcode 3中工作得很完美,但现在当我按下运行时,程序突然停在“附加到…”似乎也没有任何其他信息可以帮助解决这个问题。
总的来说,你可以尝试以下方法来解决这个问题:
重新启动模拟器。 确保你没有包含信息。plist文件在你的构建阶段->复制捆绑资源。 Resources文件夹作为文件夹引用添加到项目中(蓝色文件夹图标)。这导致了问题,在将文件夹作为一个组添加后,问题就消失了。
当前回答
固定它! !希望这能帮助一些人避免非常沮丧的几个小时。我用以下方法解决了这个问题:
Clicking on the project name in the left pane (at the very top). This will bring up a new menu to the right, something like the project/ target editors in XCode 3. Click on Build Settings up at the top. Under Packaging make sure your product name is the same for every build, and equal to whatever it says it's attaching to. Eg if XCode is Hanging at "Attaching to myLCBO" but your product name is "LCBO Finder" then it won't build. That was exactly my problem because I renamed my app half way through development.
其他回答
当我将方案从构建发布编辑到构建调试时,我注意到这发生在我身上。 我改回来了,它起作用了:)
我有这个问题,但问题不同。
另一个应用程序正在尝试向密钥链添加证书,并且由于某种原因(网络?)而挂起。重复这几次,只有当钥匙链是免费的,xcode才能运行应用程序。
这个解决方案不是技术性的,但对我来说很有效。
当attach to Process出现在xcode中并挂起一段时间时,就像iOS模拟器一样,按Command + R重新启动应用程序。
它将启动应用程序没有任何问题:)
对我有效的方法如下:
在XCode中:
单击项目名称 点击目标名称 点击“构建设置” 显示“产品名称”内容(点击三角形) 确保所有项的名称与项目名称匹配 例子 产品名称 调试myapp 释放myapp 显示“部署”内容(点击三角形) 确保有一个“IOS部署目标”项目 例子 IOS部署目标IOS 3.0 调试IOS 3.0 发布IOS 3.0
然后清理和运行。
固定它! !希望这能帮助一些人避免非常沮丧的几个小时。我用以下方法解决了这个问题:
Clicking on the project name in the left pane (at the very top). This will bring up a new menu to the right, something like the project/ target editors in XCode 3. Click on Build Settings up at the top. Under Packaging make sure your product name is the same for every build, and equal to whatever it says it's attaching to. Eg if XCode is Hanging at "Attaching to myLCBO" but your product name is "LCBO Finder" then it won't build. That was exactly my problem because I renamed my app half way through development.