Ios – Xcode: failed to get the task for process

iosxcode4

I've run in release mode my app on a iPhone with Xcode 4.

Everything worked great until when I switch to the simulator and I switched back to the iPhone. After switching back, the app is launched on the iPhone, but the home screen is displayed immediately after and in Xcode I get:

failed to get the task for process 

I've tried to remove/add Entitlements file, delete app and restart Xcode but nothing to do.

Best Answer

I am betting that your release mode includes compiling with your distribution certificate, which disallows this behavior (you wouldn't want some random fool hooking into your app after downloading it from the app store). Compile with the development certificate instead. You can change this in the building settings under code signing.