Reputation: 27221
I have XCode, Device with the application installed via testflight, Release IPA, dSym.
Simple attach to process
fails.
error: attach by pid '66475' failed -- unable to attach
I want to debug using IDE. Is it possible?
Upvotes: 7
Views: 9050
Reputation: 27203
You can't do this. For the debugger to be able to attach to a process, the app binary needs to be signed with a special entitlement (get-task-allow). Otherwise the OS will deny the debugger's ability to attach - as you have seen. The Store doesn't allow you to submit apps that have this entitlement, so you can't debug released versions of your app. OTOH, nor can anyone else, which many folks view to be a good thing...
You can make a "DebugRelease" Configuration that uses the same settings as your release build but adds this entitlement by hand if you need to debug the code that comes from the Release build - in case you have bugs that only show up in the fully optimized build, for instance. You just can't debug the Store version.
Upvotes: 15