33
votes

Today I was messing with my Developer/Distribution settings and I seem to have changed something that I can not figure out. I am running Xcode 3.2.5 and iOS 4.2.

When I set to build on my device in Debug mode, I can install my app on my device with no problem

When I set to build on my device in Release mode, I get the following error:

Error launching remote program: failed to get the task for process XXX.
Error launching remote program: failed to get the task for process XXX.
The program being debugged is not being run.
The program being debugged is not being run.

The program quits, but it seems to have installed on my device as I can then launch it with no problems.

In my Project profile, I have no code signing entitlements and Code Signing Identity set to iPhone Developer.

In my Target profile under release, I have my Code Signing Entitlements set to: "Entitlements.plist" and my Code Signing Entity set to "iPhone Distribution" which is set to my Ad Hoc profile.

I've searched the web and have tried restarting my device, deleting the provision profile and creating a new one, etc.

Any help would be appreciated, thanks.

2

2 Answers

90
votes

The problem is because you are trying to debug your application using distribution provisioning profile. If you want to run your application in debug mode, you have to sign it with development provisioning profile and certificate (both in build settings and in target). If you are trying to create a distributable, sign it with distribution credentials and add Entitlements.plist (again both in build settings and target).

2
votes

For xcode 4:you have to create Entitlements.plist file from new file. and
Targets->build Settings->Code Signing Entitlements you have to write here "Entitlements.plist"

I did this and xcode don not get anymore error