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

查看:122
本文介绍了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缓存有关(不知道这是什么以及它是什么)。以下是在XCode 4.2和4.3.x中调试4.2.1设备的步骤:

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

  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

或者,对于终端爱好者:

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


这显然很明显一个黑客,但它完美的调试,我还没有注意到任何副作用到目前为止。

享受!



小更新:

我在我的雪豹hackintosh上测试了它,使用Xcode 4.2(迄今为止最新)和设备在组织者中处于活动状态,可以在设备上运行应用程序,启动时会出现黑屏。它已安装,但显然调试器无法连接。我遇到了与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天全站免登陆