xctrace failure: "Failed to attach to target process" "Error retrieving leak information"

I am attempting to record memory leak information from the terminal in 2 different ways:

  1. launch automated test through 'xcodebuild', run xctrace -record, attaching to the PID of the test (I look for it Activity Monitor).
  2. Launch my app in the simulator and run xctrace, attaching to the PID of my app.

in both cases I get the following failures:

[ERROR] Run issues detected (trace is still ready to be viewed):

dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib, 10): no suitable image found.  Did find:

/Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib: mach-o, but not built for platform iOS-sim dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib, 10): no suitable image found.  Did find:

/Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib: mach-o, but not built for platform iOS-sim

  • Error retrieving leak information.
  • An error occurred trying to capture Leaks data.
    • Error retrieving leak information.

what are these .dylibs? and how do I rebuild them for iOS-sim?

Accepted Reply

For those interested, once I specified the device parameter then this issue went away.

Replies

For those interested, once I specified the device parameter then this issue went away.