さて、たくさんのテストとファイルシステムの掘り下げの後、私はそれを解決しました。
デバイスからダウンロードされていないファイルがほんのわずかであることが判明しています(その理由は不明です)。それらはdyldキャッシュに関連しています(これが何であるか、それが何であるかを実際にはわかりません)。 4.2.1デバイスをXCode 4.2および4.3.xでデバッグ可能にする手順は次のとおりです。
- Close Xcode
- 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.
- Create 3 empty files there called:
.copied_dyld_shared_cache_armv6
.processed_dyld_shared_cache_armv6
dyld_shared_cache_armv6
- Run Xcode and enjoy the light next to your device eventually go green:)
または、ターミナル愛好家のために:
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.