I\'m trying to use Instruments to look at resource usage in my Monotouch app. However, I can\'t get the app to launch through Instruments.
When I hit the record butt
Check your Entitlements.plist for the signed app. If get-task-allow
is false
, it will prevent Instruments from attaching to the process.
It's a signing problem: to run under the control of Instruments, the app is compiled with the Release build settings, not the Debug build settings, which usually means the app is signed with your Distribution certificate instead of your Developer certificate. The app needs to be signed with a Developer certificate for Instruments to be able to control it. Change your signing option to Developer on the Release build and you should be fine.
How about launching Instruments from inside XCode? If you're using Xcode 3, it's in the Build menu and then Run with performance tools. This will fire up Instruments and automatically start recording.
I also ran into this issue with Xcode 4. What worked for me was...
From Xcode 4, run on the connected iOS device. Launch the Instruments app manually. Choose my template (in this case TIme Profiler). Choose my app from the Target menu (to the right of the Record button). Click the Record button.
The suggested Entitlements solution did not work for me (since Entitlements are evidently no longer required in Xcode 4).
The suggested signing solution did not work either. Also, it would be inconvenient to change this every time I wanted to test with Instruments.