Xcode 4.2:尝试使用越狱的 iPhone 3G 进行开发时出现错误 0xC002
我有这部越狱的 iPhone 3G,iOS 版本为 4.2.1(最新支持的版本)。当我将其连接到 Xcode 4.2 时,Xcode 开始复制调试符号。它在过程结束时停止复制,并显示以下错误:
Xcode has encountered an unexpected error (0xC002)
No such file or directory, at ‘/SourceCache/DTDeviceKit/DTDeviceKit-867/DTDeviceKit/DTDeviceKit_Utilities.m:864’
有人遇到类似的情况吗?
我知道我应该尝试恢复手机,但我只是想以防万一有人能想出一个不涉及恢复手机的解决方案。
在 mactechnews.de 上的这篇文章,一个人报告了同样的问题 - 到目前为止还没有解决方案。
I have this jailbroken iPhone 3G with iOS version 4.2.1 (the latest supported version). When I connect it to Xcode 4.2, Xcode starts copying the debug symbols. It stops copying towards the end of the process, and shows the following error:
Xcode has encountered an unexpected error (0xC002)
No such file or directory, at ‘/SourceCache/DTDeviceKit/DTDeviceKit-867/DTDeviceKit/DTDeviceKit_Utilities.m:864’
Anybody experiencing anything similar?
I know I should try and restore the phone, but I'm asking just in case anybody can come up with a solution that doesn't involve restoring it.
In this post on mactechnews.de, one guy reports the same problem -- with no solution, so far.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
好吧,经过大量测试和挖掘文件系统......我解决了它。
事实证明,只有少数文件没有从设备下载(原因尚不清楚)。它们与 dyld 缓存有关(真的不知道这是什么以及它的用途)。以下是使 4.2.1 设备在 XCode 4.2 和 4.3.x 中可调试的步骤:
~/Library/Developer/Xcode/iOS DeviceSupport/4.2.1 (8C148)/Symbols/System/ Library/Caches/com.apple.dyld/
注意:如果你没有这个文件夹,请运行 Xcode,连接您的设备,然后等到管理器中出现错误 0xC002 - 此时应该创建该文件夹。
.copied_dyld_shared_cache_armv6
.processed_dyld_shared_cache_armv6
dyld_shared_cache_armv6
或者,对于终端爱好者:
这显然是一个黑客,但它非常适合调试,到目前为止我还没有注意到任何副作用。
享受!
小更新:
我在我的雪豹 hackintosh 上使用 Xcode 4.2(迄今为止最新的)对其进行了测试,尽管该设备在管理器中处于活动状态并且可以在设备上运行该应用程序,但我在启动时遇到黑屏。它已安装,但显然调试器无法连接。我在 4.0.2 中遇到了同样的问题,当时 0xC002 问题尚未发生,所以我认为这是不相关的,甚至可能不会发生在其他人身上。尽管如此,0xC002还是解决了。
在我使用 Lion 和 Xcode 4.3.2 的主要开发机器上,设备是完全可调试的。
Alright, after a lot of testing and digging up the filesystem... I solved it.
It turns out that there are just a few files that are not downloaded from the device (for reasons still unknown). They are related to the dyld cache (don't really know what this is and what it's for). Here are the steps to make your 4.2.1 device debuggable in XCode 4.2 and 4.3.x:
~/Library/Developer/Xcode/iOS DeviceSupport/4.2.1 (8C148)/Symbols/System/Library/Caches/com.apple.dyld/
Note: if you don't have this folder, run Xcode, connect your device, and wait until the error 0xC002 appears in Organizer - the folder should be created by that time.
.copied_dyld_shared_cache_armv6
.processed_dyld_shared_cache_armv6
dyld_shared_cache_armv6
Or, for the terminal lovers:
This is obviously a hack but it works perfectly for debugging and I haven't noticed any side-effects so far.
Enjoy!
Small update:
I tested it on my snow leopard hackintosh, with the Xcode 4.2 (most recent to date) and although the device is active in the organizer and it is possible to run the app on the device, i get black screen on launch. It gets installed but apparently debugger cannot get attached. I had the same problem with 4.0.2, when the 0xC002 problem didn't yet occur so I think it's unrelated and might even not happen to others. Nevertheless, 0xC002 is still solved.
On my main development machine with Lion and Xcode 4.3.2, device is perfectly debuggable.
上面的答案(https://stackoverflow.com/a/9944892/1390251)基本上有效,
但对于较新版本的 Xcode,您可能需要按如下方式重命名文件,
让它们以“7”而不是“6”结尾:
如果不确定,您可以保留两组文件(...6 和 ...7)
在相关文件夹中(也可以是 5.1.1)
它应该有效。
(已在iOS v5.1.1正版iPhone 4上测试过)
The answer above (https://stackoverflow.com/a/9944892/1390251) works, basically,
but for newer versions of Xcode you probably need to rename the files as follows,
having them end with '7' instead of '6':
If not sure, you can keep both sets of files (...6 and ...7)
in the relevant folder (can also be 5.1.1 for that matter)
and it should work.
(have tested it on iPhone 4 with iOS v5.1.1 genuine)
似乎您无法在 iOS 4.2.1 上调试应用程序。我尝试了几次恢复到 iOS 4.2.1,效果相同。降级到 iOS 4.0 是唯一有效的办法。
整个问题的原因是 XCode 不支持 iOS 4.2.1,根据 此网站。
It seems that you cannot debug apps on iOS 4.2.1. I tried several restores to iOS 4.2.1 with same effect. Downgrading to iOS 4.0 was the only thing that worked.
The reason for whole problem is that iOS 4.2.1 is not supported in XCode, according to this website.
Xcode 从 5.0.1 获取调试信息时出错苹果手机
已解决,请参阅带有 iOS5.0.1 调试信息的存档链接
下载&解压到“~/Library/Developer/xCode/iOS DeviceSupport/” &开心一点=)
Error in Xcode getting debugging info from 5.0.1 iphone
solved, see the link to archive with iOS5.0.1 debug info
download & unpack to "~/Library/Developer/xCode/iOS DeviceSupport/" & be happy =)
我修复了这个错误![在此处输入图像描述][1]这样:
我复制5.1.1(9B206),将其重命名为5.1.1(9A405)[我的ios设备是这个版本],然后错误是走了。
I fixed this bug in![enter image description here][1] this way:
I duplicate the 5.1.1(9B206), rename it to 5.1.1(9A405)[my ios device is this version], then the error is gone.