Xcode 成功构建,但不复制到 iOS 设备,并立即终止调试器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6636924/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode Succeeds Build, but does not copy to iOS Device, and terminates debugger immediately
提问by Adam Johnson
This problem is pretty ridiculous and I'm running out of ideas of what to try:
这个问题非常荒谬,我已经没有什么可以尝试的想法了:
I have been successfully using Xcode to debug my game on my iOS device (iPhone) for the past couple of weeks, but now all it will do when I try to do a run with my iPhone set as target is successfully build the application and then Stop immediately. No Errors, nothing in console logs. The application doesn't even copy over to my device.
在过去的几周里,我一直在成功地使用 Xcode 在我的 iOS 设备 (iPhone) 上调试我的游戏,但是现在当我尝试将我的 iPhone 设置为目标运行时,它会成功构建应用程序,然后立即停止。没有错误,控制台日志中没有任何内容。该应用程序甚至不会复制到我的设备上。
Xcode says: Building, Running, Finished Running....all within 2 seconds...
Xcode 说:构建、运行、完成运行......都在 2 秒内......
I'm using Xcode 4 iOS 4.3
我使用的是 Xcode 4 iOS 4.3
I've tried the following:
我尝试了以下方法:
- Rebooting mac
- Deleting application from iPhone and rebooting iPhone (although my power button no longer works on my iPhone, so I had to run down the entire battery to try this)
- Cleaned project and rebuilt
- 重启mac
- 从 iPhone 删除应用程序并重新启动 iPhone(虽然我的电源按钮不再适用于我的 iPhone,所以我不得不耗尽整个电池来尝试这个)
- 清理项目并重建
Nothing seems to help. The game compiles and runs successfully on the iOS Simulator within Xcode as well, and as I've said I've been able to copy my game over prior to yesterday, but for some reason it just stopped working...
似乎没有任何帮助。该游戏也可以在 Xcode 内的 iOS 模拟器上成功编译和运行,正如我所说,我已经能够在昨天之前复制我的游戏,但由于某种原因它停止工作......
UPDATE: Solved by setting the "accelerometer" from "NO" to "YES" in Info.plist.
更新:通过在 Info.plist 中将“加速度计”从“NO”设置为“YES”来解决。
采纳答案by Adam Johnson
Solved by setting the "accelerometer" from "NO" to "YES" in Info.plist.
通过在 Info.plist 中将“加速度计”从“NO”设置为“YES”来解决。
回答by groumpf
I know you found your answer but I found a similar case when starting a project from XCode 4, the app plist contains a required device capabilities "armv7". So even after adding armv6 to the build settings, the program didn't run on a 3G. I deleted the required device capabilities "armv7" and it works.
我知道您找到了答案,但我在从 XCode 4 启动项目时发现了类似的情况,应用程序 plist 包含所需的设备功能“armv7”。因此,即使在将 armv6 添加到构建设置后,该程序也无法在 3G 上运行。我删除了所需的设备功能“armv7”,它可以工作。
回答by Joey
If it helps anyone, the problem for me was a blank value in my plist under "Required Device Capabilities." Deleting the blank value fixed the issue.
如果它对任何人有帮助,那么我的问题是我的 plist 中“所需设备功能”下的空白值。删除空白值解决了这个问题。
回答by Shmidt
My problem was "gps" value in plist under "Required Device Capabilities." Deleting it fixed the issue for iPad2.
我的问题是“所需设备功能”下 plist 中的“gps”值。删除它修复了 iPad2 的问题。