18

I´ve found a strange issue with latest XCode 4.2 when trying to deploy my app to an iphone that just upgraded to 5.0.1.

It starts copying the debug info and the progress moves until the end, although it does not move beyond 'copying file 2 of 9'.

After it's done I get the message:

Xcode has encountered an unexpected error (0xC002)
No such file or directory, at ‘/SourceCache/DTDeviceKit/DTDeviceKit-867/DTDeviceKit/DTDeviceKit_Utilities.m:864’

in the organizer window. Any similar experience and clue on how to get over it? Needless to say every party involved has been restarted dutifully, including myself. Thanks for all your help

competent_tech
  • 44,465
  • 11
  • 90
  • 113
Serjar
  • 183
  • 1
  • 5

4 Answers4

18

I found the following post helpful, although it is kind of dated: https://stackoverflow.com/a/9944892/1031623

The only thing that I had to change is the following:

  1. Close Xcode
  2. Go to: "~/Library/Developer/Xcode/iOS DeviceSupport/5.0.1(9A405)/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_armv7 <== not 6
    • .processed_dyld_shared_cache_armv7 <== not 6
    • dyld_shared_cache_armv7 <== not 6
  4. Run Xcode and enjoy the light next to your device eventually go green:)

Community
  • 1
  • 1
Tomer Bar
  • 181
  • 1
  • 6
  • 1
    This worked for me on an old iPhone 3G on 4.2.1. I replaced the instance of 5.0.1 with the proper 4.2.1 directory and created empty files like you've suggested with armv6 instead of armv7. – Daddy Apr 10 '12 at 21:58
  • I'm glad to hear that :) For 4.2.1, just follow the exact instructions from the link given by Tomer. @Tomer: thanks for linking to my answer, however I don't understand what did you mean when saying "dated" - it was posted 6 days before your answer:) – Bartek Eborn Apr 12 '12 at 19:46
  • Can confirm this fixed an issue with a jailbroken iPhone 5.0.1 (9A405) on Xcode 4.3.2 - You're a lifesaver! – lol Apr 16 '12 at 09:54
  • Can confirm with an iPhone 3GS 5.0 Cheers – Ege Akpinar Apr 24 '12 at 23:24
15

I have found a potential fix. I tracked the issue down to some files not copying into the ~/Library/Developer/XCode/iOS DeviceSupport/5.0.1(9A405)/ folder. I borrowed a friend's iPad with the 5.0.1 update, and attempted to use his device for development. It worked fine, and I noticed my iOS DeviceSupport/5.0.1(9A405) folder suddenly had many, many more files. I then connected my problematic iPad and bam, it just worked.

I attempted restoring, recovering, etc. and I could not fix the issue with these methods. I did the OTA update, and so did my friend, so our iPads were updated in exactly the same way. I do not have any explanation of the issue, but at least I have found a workaround.

If you don't have access to another device with the files, here's a zip file of them:

http://www.enemyhideout.com/ios/5.0.1%20(9A405).zip

OGHaza
  • 4,795
  • 7
  • 23
  • 29
Chris Hill
  • 1,914
  • 1
  • 16
  • 24
  • Thank you for the info and the offer. Since I found the problem I was holding the upgrade of the rest of beta devices. I will try with one and see if I get the files that way. – Serjar Nov 15 '11 at 10:52
  • And yes, it solved it. I moved to 5.0.1 for a second phone over usb-iTunes, was able to debug with it. Once the files are there, no problem with the rest. Thanks! – Serjar Nov 15 '11 at 15:12
  • File location on my mac is ~/Library/Developer/Xcode/iOS DeviceSupport – Abduliam Rehmanius Nov 17 '11 at 18:21
  • Apologies, Abduliam, I had mistakenly put the wrong path. Fixed! – Chris Hill Nov 17 '11 at 23:29
  • Thanks it worked. Path in my xcode 4.2 is Developer/Platforms/iPhoneOS.platform/DeviceSupport – ArunGJ Dec 28 '11 at 05:35
1

Delete the ~/Library/Developer/XCode/iOS DeviceSupport/5.0.1(9A405)/ folder.
Then connect your device and go to the Organizer.
Xcode should recreate that folder and fill it up with informations from your device.

Oneiros
  • 4,328
  • 6
  • 40
  • 69
0

Thank you @Chris Hill, I was running into this on Xcode 4.3.1, but instead of

.../DTDeviceKit-867/... I was getting .../DTDeviceKit-1197/...

At first I replaced all the files mv -f ~/library/... and started up Xcode again, I deleted all the files I placed there from your pkg, So I tried with Xcode open, iPhone plugged in; and it worked perfect! Thanks again

dhazelett
  • 336
  • 1
  • 3
  • 10