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.
Just get the same problem by installing my app on iPhone 5S with Distribution Profile
-> my solution was to activate Capabilities wich are set in Distribution Profile(in my case "Keychain Sharing","In-App Purchase" and "Game Center")
Hope this helps someone...
To anyone who comes across this: After reading this, I attempted to solve the problem by setting the Debug signing to my Development certificate only to find that deployment was still failing.
Turns out my target was Release and therefore still signing with the distribution certificate - either go back to Debug target or change the release signing to Development temporarily.
Just had the same problem - app was being installed OK, but won't run from Xcode with the "process launch failed: failed to get the task for process".
Turns out my development certificate expired during the night. Regenerating the certificate and the provisioning profiles solved the problem.
If anyone is having this issue but is sure they have their certificates and code signing correctly set up, check the capabilities tab when you click on the project (i.e. next to build settings tab, build phases tab, etc).
In my case there were broken links for Game Center and In-App Purchases that needed fixing (by clicking the "fix me" buttons) to solve this issue.
I had this issue when trying to debug an App on a device I hadn't used before. Developer profile was correctly set. The device was part of our teams account but wasn't included in my profile.
Simply had to open Organizer -> Select the Device -> Add to Member Center
If you've set the correct code signing certificate under Build Settings->Code Signing, then make sure you are also using the correct provisioning profile for Debug/Release mode as well.
I was having this issue because I was using an Ad-Hoc provisioning profile for both Debug/Release modes, which doesn't allow for a development profile to be used when doing a debug build.
Having the developer code signing id is correct for sure, but also make sure you device is added to the Member Center via organizer, or through the developer portal.
A few days ago I reset my device list, and today I was suddenly getting this for an iPod I debug with all the time. About 15 mins later I realized the problem.
I had this same problem, however in a little bit different situation. One day my application launches fine (using developer provision), then I do some minor editing to my Entitlements file, and after that it stops working. The application installed fine on my device, however every time I tried to launch it, it exited instantly (after the opening animation). (As I made edits to other files too, I did not suspect the following problem)
The problem was in the Entitlements file format, seems so that the following declarations are not the same:
<key>get-task-allow</key> <true />
Altough it's an XML format, do not use spaces in the tag or the Xcode will not be able to connect to the process.
I was using developer provisioning profile all along.
Edit: Also make sure the line ending in your Entitlements file are \n (LF) instead of \r\n (CRLF). If you edit the entitlements file on Windows using CRLF line endings may cause your application to fail to launch.
Change the profile for code signing. Select your project, go to Build Settings > Code Signing Identity. Switch to other developer profile.
I had this problem after I created a new developer certificate.
The following was already correct: The old private key was deleted from the keychain, all profiles where up to date, the build configuration and signing settings were correct. Yet I had this problem.
Solution: I had to restart Xcode (5.1.1), because it was not aware of my new developer certificate. I also deleted the obsolete profiles from my devices just to be sure and to clean up.
I had a the same issue and after reading the above answers all I had to do was go to Build Settings > Code Signing > Provisioning Profile > None and was able to ran the app on my devices again. Hope this helps someone else out