Xcode 4.2:尝试使用越狱的 iPhone 3G 进行开发时出现错误 0xC002

发布于 2024-12-12 22:17:31 字数 571 浏览 4 评论 0原文

我有这部越狱的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

巷子口的你 2024-12-19 22:17:31

好吧,经过大量测试和挖掘文件系统......我解决了它。
事实证明,只有少数文件没有从设备下载(原因尚不清楚)。它们与 dyld 缓存有关(真的不知道这是什么以及它的用途)。以下是使 4.2.1 设备在 XCode 4.2 和 4.3.x 中可调试的步骤:

  1. 关闭 Xcode
  2. 转到:~/Library/Developer/Xcode/iOS DeviceSupport/4.2.1 (8C148)/Symbols/System/ Library/Caches/com.apple.dyld/
    注意:如果你没有这个文件夹,请运行 Xcode,连接您的设备,然后等到管理器中出现错误 0xC002 - 此时应该创建该文件夹。
  3. 在其中创建 3 个空文件,名称为:
    • .copied_dyld_shared_cache_armv6
    • .processed_dyld_shared_cache_armv6
    • dyld_shared_cache_armv6
  4. 运行 Xcode 并享受设备旁边的指示灯最终变绿:)

或者,对于终端爱好者:

cd ~/Library/Developer/Xcode/iOS\ DeviceSupport/4.2.1\ \(8C148\)/Symbols/System/Library/Caches/com.apple.dyld/
touch .copied_dyld_shared_cache_armv6
touch .processed_dyld_shared_cache_armv6
touch 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:

  1. Close Xcode
  2. Go to: ~/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.
  3. Create 3 empty files there called:
    • .copied_dyld_shared_cache_armv6
    • .processed_dyld_shared_cache_armv6
    • dyld_shared_cache_armv6
  4. Run Xcode and enjoy the light next to your device eventually go green:)

Or, for the terminal lovers:

cd ~/Library/Developer/Xcode/iOS\ DeviceSupport/4.2.1\ \(8C148\)/Symbols/System/Library/Caches/com.apple.dyld/
touch .copied_dyld_shared_cache_armv6
touch .processed_dyld_shared_cache_armv6
touch dyld_shared_cache_armv6

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.

剩一世无双 2024-12-19 22:17:31

上面的答案(https://stackoverflow.com/a/9944892/1390251)基本上有效,
但对于较新版本的 Xcode,您可能需要按如下方式重命名文件,
让它们以“7”而不是“6”结尾:

touch .copied_dyld_shared_cache_armv7
touch .processed_dyld_shared_cache_armv7
touch dyld_shared_cache_armv7

如果不确定,您可以保留两组文件(...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':

touch .copied_dyld_shared_cache_armv7
touch .processed_dyld_shared_cache_armv7
touch dyld_shared_cache_armv7

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)

[浮城] 2024-12-19 22:17:31

似乎您无法在 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.

羅雙樹 2024-12-19 22:17:31

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 =)

梦明 2024-12-19 22:17:31

我修复了这个错误![在此处输入图像描述][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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文