43

I'm running an app on my iOS device but, in Instruments, that device is greyed out.

This also means I can't attach the process (Cant launch iOS app with Instruments on device). Is it anything to do with my earlier question: Instruments > Profile - Revoke and request

Xcode: 6.1.1 iOS: 7.1.2

Any idea why?

Community
  • 1
  • 1
Snowcrash
  • 80,579
  • 89
  • 266
  • 376
  • Is your device is configured for development (look at it inside Xcode organizer, devices)? – Rashwan L Dec 31 '15 at 06:34
  • Make sure you configure the device for development. Then ensure that the Xcode project settings for the deployment target match your device's OS. Also, ensure that the 'device' option matches the device you are trying to build to. – Tom Metzger Jan 20 '16 at 18:58
  • I have the same issue, the device is definitely configured because I've profiled my app before on that device. Have you fixed the issue? – Stas Jan 27 '16 at 16:44

10 Answers10

49

I only had to reboot my phone (not my Mac), and then the error went away (Xcode 9.2, iPhone X running 11.2.6).

Max
  • 1,203
  • 1
  • 14
  • 20
22

i was having this issue and resolved it by

  1. Unplugging my device
  2. Turning my device off
  3. Rebooted my mac
  4. Turned device back on and plugged into computer after logging back in.

now it shows up in instruments. I tried unplugging device, restarting xcode, but that didn't work. rebooting everything is what did the trick for me.

odyth
  • 4,324
  • 3
  • 37
  • 45
6

I met the this problem. Xcode(Version 9.3.1 (9E501)), iphone 7, And I forcely quit the Instrument. It's work

冯剑龙
  • 569
  • 8
  • 22
2

I came across same problem today on xcode7.2.1, iOS 9.2.1, iPhone 6Sp. Resolved by rebooted my mac, my watch and the iPhone.

wupher
  • 63
  • 1
  • 6
1

If your workspace contains several projects and/or several targets, it seems that XCode doesn't know which binary to profile.

Just Edit your scheme -> Profile -> Choose an Executable and it should enable the profiling option.

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
1

I had the same problem where Profile was greyed out. It turned out to be I had the device option at the top set to Generic iOS Device

enter image description here // this will make Profile greyed out

Once I switched it to an actual simulator device or my actual device Profile was no longer greyed out

enter image description here

One other option can be to in Xcode at the top go to Help > search Edit Scheme and select it > on the left side of the screen select Profile > change Executable drop down to your_project's_name.app

enter image description here

Lance Samaria
  • 17,576
  • 18
  • 108
  • 256
0

I don't know which process helped but I force quit AppleMobileDeviceHelper and DTServiceHub in the Activity Monitor and then it started working again (I was able to select my phone without rebooting).

Felix Lapalme
  • 1,058
  • 1
  • 11
  • 25
0

Recently, I confronted the question again on Xcode Version 10.1 (10B61), iphone 7 and Mac 10.14.1 (18B75). I resolved it by upgrading the deployment from 8.0 to 10.1. In fact, I have meet many strange Xcode bugs caused by the version, liking this one(xcode gpu shader profiler)

冯剑龙
  • 569
  • 8
  • 22
0

It turned out that my iPhone is not trusted my computer.

How to re-trust computers, see: https://www.wikihow.com/Trust-a-Computer-on-an-iPhone

In short, you should reset Location and Privacy in settings, and then plug-in your iPhone again. And you will see 'Trust this computer' again.

Franz Wang
  • 596
  • 4
  • 14
0

My issue what that it was asking me to trust the computer every time I plugged it in.

To fix it, I had to turn on the Hotspot then turn it back off.

Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113