Xcode 4.2:尝试使用越狱的 iPhone 3G 进行开发时出现错误 0xC002 [英] Xcode 4.2: Error 0xC002 when trying to use a jailbroken iPhone 3G for development

查看:14
本文介绍了Xcode 4.2:尝试使用越狱的 iPhone 3G 进行开发时出现错误 0xC002的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这款 iOS 版本 4.2.1(支持的最新版本)的越狱 iPhone 3G.当我将它连接到 Xcode 4.2 时,Xcode 开始复制调试符号.它在进程结束时停止复制,并显示以下错误:

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.

mactechnews.de 上的这篇文章,一个人报告了同样的问题——到目前为止还没有解决方案.

In this post on mactechnews.de, one guy reports the same problem -- with no solution, so far.

推荐答案

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

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. 关闭 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

或者,对于终端爱好者:

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


这显然是一个 hack,但它非常适合调试,到目前为止我还没有注意到任何副作用.
享受吧!

小更新:
我使用 Xcode 4.2(迄今为止最新版本)在我的雪豹 hackintosh 上对其进行了测试,尽管该设备在管理器中处于活动状态并且可以在设备上运行该应用程序,但我在启动时出现黑屏.它已安装,但显然调试器无法连接.我在 4.0.2 中遇到了同样的问题,当时还没有发生 0xC002 问题,所以我认为它是不相关的,甚至可能不会发生在其他人身上.尽管如此,还是解决了 0xC002.
在我使用 Lion 和 Xcode 4.3.2 的主要开发机器上,设备是完全可调试的.


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.

这篇关于Xcode 4.2:尝试使用越狱的 iPhone 3G 进行开发时出现错误 0xC002的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆