42

I have been trying unsuccessfully to profile my device (via Instruments) using the latest version of Xcode 7.0.1 (7A1001 released 9/28), as well as the previous version of Xcode 7 (7A218), as well as Xcode 7.1 Beta 2 (7B75).

My device is an iPhone 6+ with iOS 9.0.1 installed - the latest GM release of iOS9. I am able to run / debug applications on this device without issues.

In the screenshots below you can see that my device is disabled (greyed out) in all screenshots in all versions. I am able to profile other devices running iOS 8.4.1 without any issues.

Does the current version of Xcode not support profiling against iOS 9.0.1 or is there some kind of configuration setting or known work around for this?

Xcode 7.0.1:
Xcode 7.0.1

Xcode 7.0:
Xcode 7.0

Xcode 7.1 beta 2:
Xcode 7.1 beta 2

4
  • 1
    Same here! Do you managed to get it working?
    – amb
    Oct 2, 2015 at 15:27
  • 1
    Hi @amb - Yes and no. Not shortly after I wrote this up was iOS 9.0.2 released - so I upgraded my device (as well as cleaned out the derived data in Xcode again), and suddenly Instruments decided it wanted to acknowledge the device. I don't consider it a "solution" since I can't say I understand why it resolved the problem. Confirmed my provisioning profiles, certificates, etc were all correct... I would really like to find out the root cause.
    – Derek Lee
    Oct 2, 2015 at 16:04
  • @amb - Earlier this week it happened again to me where I was not able to select my device for profiling. Long story short: a full reboot of the device seemed to get things moving in the right direction. I've posted detailed steps below. Hope this helps.
    – Derek Lee
    Oct 9, 2015 at 10:16
  • 1
    I filed a radar for this last November: openradar.me/23550263, which is still open 🙃
    – NachoSoto
    Jan 11, 2016 at 21:27

4 Answers 4

87

TL;DR - Perform a complete reboot of your device; restart Xcode & instruments; select "Open Xcode" if prompted to enable the device for development.

Update 3/31/2016: I haven't encountered any issues with the latest version(s) of Xcode (7.2.x, 7.3), so it seems that the stability here has been improved.


I believe I may have finally gotten this to work properly. Detailed steps:

  1. Unplug the device from your Mac & power down the device completely (hold the power button for several seconds; slide to power off).
  2. Close Xcode and Instruments.
  3. Restart the device & once it has booted completely re-connect it to your Mac.
  4. Re-launch Xcode. Here, my device showed as disabled and Xcode indicated that the device was not available for use.
  5. Open your project; clean (Shift+Command+K), Build (Command+B), Profile (Command+I).
  6. After Instruments launched I noticed that the device was enabled. Upon selecting it, a message was displayed with the title "Enable this device for development?" and message "This will open Xcode and enable this device for development." (Note that this only happened to me the first time I went through this process even though I had already been using the device for development - whereas some users have also reported that they are not presented with this dialogue.)

Enable this device for development?

  1. Click "Open Xcode". Here Xcode did not prompt me for anything nor was anything displayed - no additional messages indicating anything had been done or that the device was or was not available for development. Opening the Devices window, the device appeared to be available. (I have not been presented with this option for subsequent occurrences.)
  2. Now I was able to select the device in Instruments and profile it.

As a side note, I was also again able to delete installed apps from the Devices window (I realized that this was not possible to do previously).

I'm unsure how my device ended up in this state however I will be on the lookout to see if this continues to occur.

Please note that this was done using Xcode 7.0.1.


Update: My device seems to lapse back into not being able to be used for profiling some time after performing these steps - I've had to reboot my device again in order for it to be available for profiling. Not sure what is triggering this behavior but I will file a Radar for this.

9
  • I had the same experience but was moving between 7.1 beta to beta 3. (7B85) Oct 16, 2015 at 15:03
  • 1
    I had the same problem and your rebooting procedure fixed it. With iOS 9.1 and Xcode 7.1.1.
    – RobertL
    Nov 22, 2015 at 18:54
  • Nice! I did not have to do that "Enable this device for development" step, though. Just a note. Nov 24, 2015 at 20:46
  • Thanks for the note @FredrikJohansson! I only had to do that the first time I ended up going through this process. I'll update the answer to reflect this.
    – Derek Lee
    Nov 25, 2015 at 1:53
  • Thanks for posting this. Instruments showed devices disabled. I must have entered my password incorrectly the first time I ran Instruments from Xcode on the new computer.
    – bio
    Jan 2, 2016 at 20:44
4

Close instruments -> reset your device by long pressing home and power button -> restart instruments. Works for Xcode 7.3.

0
0

According to Apple staff on the developer forums the behaviour of this issue is greatly improved in the Xcode 7.3 betas, so one easy solution is to try upgrading Xcode. I've upgraded and it seems to be behaving so far.

0
0

This issue still occurred with XCode 10.3 and iOS 12.4.2

I restarted the device only, and it worked.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.