Instruments does not work on XCode 4 with device

柔情痞子 提交于 2020-01-09 13:01:36

问题


Until very recently, instruments worked fine. I don't know what I did to make it mad, but now it won't attach to any device that I try to Profile with; no device at all. I've tried an iPhone, iPad, and 2 iPod touches; no luck! I'm using XCode 4.

Here is the sequence of events:

  1. With device attached, click Product->Profile.
  2. App compiles onto device.
  3. Instruments launches, but an error sound is heard
  4. The record button is grayed out.
  5. Choose Target doesn't allow me to attach or choose target (empty list).

Background points:

  1. Profile is set to Debug build within the Scheme of the project. This is true for all static libs as well.
  2. I AM able to run the Core Animation instrumentation on the device, but only when I launch I launch Instruments separately from Xcode. In this scenario, i can only attach to an existing executable; I can't use "Choose Target" (the list is empty).
  3. I tried restoring one of the devices to factory settings...still didn't work.
  4. Looking at the Console of the device, i see these messages:

    unknown lockdownd[17] <Error>: 001d5000 handle_connection: Could not receive USB message #16 from Instruments. Killing connection
    unknown com.apple.mobile.lockdown[17] <Notice>: Could not receive size of message
    

Any help would be most appreciated


回答1:


There was a discussion on the apple developer forums about this issue:

Instruments does not work on Xcode 4 with device

It appears that different Apple products will change/update the MobileDevice framework. Some of these updates break the Instruments integration.

To fix this on my own machine, I installed the iTunes 10.5 beta v6. Fire up XCode, and I'm back in business Instrumenting on my device.




回答2:


May be worth a try - I had the same issue - I changed 'Targeted Device Family' from 'iphone/ipad' to 'iphone' in the build settings and this solved it for me.




回答3:


I quit Xcode and Instruments, relaunched them, did a clean build, and then did Product->Profile, and Instruments magically started working again with my device. Go figure.




回答4:


Have you also installed the latest developer builds of XCode 4.2 w/ the iOS 5.0 builds? I've found that even if you install it in a separate directory, it does something to the instruments in the original XCode 4 directory. Using the latest version of XCode will allow you to use it properly.




回答5:


Workaround: Go back to Xcode and use Cmd-Tab to switch to Instruments. I have to do that twice to get Instruments running again.

referred



来源:https://stackoverflow.com/questions/6297554/instruments-does-not-work-on-xcode-4-with-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!