Snowcrash
Snowcrash

Reputation: 86057

Instruments > device grayed out

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?

Upvotes: 45

Views: 23164

Answers (10)

Iulian Onofrei
Iulian Onofrei

Reputation: 9710

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.

Upvotes: 0

Lance Samaria
Lance Samaria

Reputation: 19572

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

Upvotes: 1

Franz Wang
Franz Wang

Reputation: 725

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.

Upvotes: 1

冯剑龙
冯剑龙

Reputation: 609

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)

Upvotes: 0

冯剑龙
冯剑龙

Reputation: 609

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

Upvotes: 7

Max
Max

Reputation: 1222

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).

Upvotes: 49

Anthony Nevo
Anthony Nevo

Reputation: 21

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.

Upvotes: 1

Felix Lapalme
Felix Lapalme

Reputation: 1068

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).

Upvotes: 0

wupher
wupher

Reputation: 63

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.

Upvotes: 2

odyth
odyth

Reputation: 4336

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.

Upvotes: 22

Related Questions