10
votes

I am using the latest version of Xcode 9 and macOS 10.13.

When I try to make a memory graph from the current state of my application, it shows an empty screen that says No Selection.

"No selection" title after trying to create a memory graph

I also tried to profile and work with Instruments, but it did not allow me to run due to a permission error.

Target failed to run.

Permission to debug [app name] was denied.

I am aware of these threads and tried the suggestions available in them, but they didn't seem to work:

Things that I tried:

  • Restarting Xcode
  • Emptying the Derived Data folder
  • Cleaning the project
  • Cleaning the Build folder
  • Modifying the scheme's application environment to Debug instead of Release
  • Manually managing provisioning profiles and selecting Development profiles for Debug and Release
  • Trying simulators with different OS versions (iOS 11, iOS 10)

Looks like it's a specific issue with Xcode 9.

Are there any workarounds for this issue?

3
I also have this issue. I'm convinced it's caused by provisioning profile issues. I had it working once, but then it stopped working again the next time I tried.Justin Stanley
Try this solution it worked for me.Ashiq Sulaiman
This is a known bug. Update your Xcode to the latest beta.matt

3 Answers

5
votes

I tried building the application on a physical device and it worked, hovever, the memory graph did not show my Swift classes (for e.g., my controllers were simply not there). Allocation observing worked fine with Instruments, nonetheless.

It seems like this is an issue caused by the simulator.

1
votes

In My Case I was Using Xcode 9. When I have checked to Xcode-> Preferences->Locations->Command Line Tools = Xcode 8.3.3 so I just Changed from Xcode 8.3.3 to Xcode 9.0 and It starts working.

1
votes

In my case the Build Configuration for Profiling was set to Release instead of Debug in the Scheme. After changing it, I could just profile in the Simulator.

Hope this helps.