Xcode: failed to get the task for process

IosXcode4

Ios Problem Overview


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.

Ios Solutions


Solution 1 - Ios

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.

Solution 2 - Ios

Change the profile for code signing. Select your project, go to Build Settings > Code Signing Identity. Switch to other developer profile.

Solution 3 - Ios

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.

Solution 4 - Ios

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

Solution 5 - Ios

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.

Solution 6 - Ios

I switched back to "Automatic" on the build settings provisioning profile for "Debug" and left the release certificate profile unchanged, mine worked. Tried the other answers. nothing worked. Didn't want to have to reconfigure my certificates. Automatic on the provisioning profile did the trick

screenshot

Solution 7 - Ios

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.

Solution 8 - Ios

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...

Solution 9 - Ios

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.

Solution 10 - Ios

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.

Solution 11 - Ios

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.

Solution 12 - Ios

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

Solution 13 - Ios

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:

Correct:

<key>get-task-allow</key>
<true/>

Incorrect:

<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.

Solution 14 - Ios

enter image description here I had this error while running from Xcode

  1. Edit Scheme

  2. Choose Runenter image description here

  3. Uncheck “Debug executable”

  4. Clean Derived Data: ⌘ Cmd + ↑ Shift + K

  5. Run the app again: ⌘ Cmd + R

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionaneuryzmView Question on Stackoverflow
Solution 1 - IosborrrdenView Answer on Stackoverflow
Solution 2 - IosTeofilo Israel Vizcaino RodrigView Answer on Stackoverflow
Solution 3 - IosCharlie Scott-SkinnerView Answer on Stackoverflow
Solution 4 - IosDamongoCoderView Answer on Stackoverflow
Solution 5 - IosAleksander NiedziolkoView Answer on Stackoverflow
Solution 6 - Iosabiodun ekundayoView Answer on Stackoverflow
Solution 7 - IosnenchevView Answer on Stackoverflow
Solution 8 - IosAlexej W.View Answer on Stackoverflow
Solution 9 - IosSea Coast of TibetView Answer on Stackoverflow
Solution 10 - IoshawkeyecoderView Answer on Stackoverflow
Solution 11 - IosthetrutzView Answer on Stackoverflow
Solution 12 - IosKevin HawkerView Answer on Stackoverflow
Solution 13 - IosSipkaView Answer on Stackoverflow
Solution 14 - IosPradeeptaView Answer on Stackoverflow