Xcode build & run error: “Process launch failed: Failed to get the task for process 216”

浪子不回头ぞ 提交于 2020-07-04 06:18:05

问题


After updating to Mavericks and making sure I got the latest updates of Xcode installed as well, Xcode suddenly fails to launch apps on the device.

It installs the app on my iPhone but then before running it, throws this error:

Process launch failed: Failed to get the task for process 216

This is how the Code Signing settings look like since the update:

enter image description here

Also checked Scheme and it runs in Debug configuration.

Is this a known issue with Mavericks? How to fix it?


回答1:


I got this error when signing it with a distribution profile. In my case, it was an Ad Hoc profile.

It was confusing to me because you can't 'run' and install the app directly to your device if you sign it with a distribution profile. For my case, I use testflightapp and was able to upload the IPA.

The error message is not very descriptive of the problem.

Also, if you are stuck, make sure you check the profiles for both the 'Project' and the 'Target'




回答2:


Figured it out. My Developer Certificate was marked as "Expired" in Keychain (search Spotlight for "Keychain", then click on the "user" tab on the left). I deleted it, then went to Xcode > Preferences > Accounts, selected my ID and clicked on "View Details", then clicked the Update icon at the bottom left. Xcode re-installed the renewed certificate. Then I went to Build Settings and manually set the Debug configuration to use the Developer certificate Xcode just reinstalled for me.




回答3:


I think you use the distribution profile, you can revise like this:

[enter image description here]




回答4:


In my case I had to go to Keychain, lock/unlock or unlock/lock Login, there is something with the signing that looses state.



来源:https://stackoverflow.com/questions/23462225/xcode-build-run-error-process-launch-failed-failed-to-get-the-task-for-proc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!