33

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.

shohaku
  • 349
  • 1
  • 3
  • 6

2 Answers2

90

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

Matteo Alessani
  • 10,264
  • 4
  • 40
  • 57
Vin
  • 10,517
  • 10
  • 58
  • 71
  • In my build/target settings under Debug, I have it signed with my development profile and no Entitlement.plist. Under Release, I have my build/target settings signed to my distribution profile with an Entitlement. I still don't see where I am messing this up. – shohaku Jan 18 '11 at 06:27
  • 2
    The question is what are you trying to do. If you are trying to debug the app, use the debug configuration. Since you are using the release configuration, you can't debug the application. You can only deploy the 'yourprojectname.app' file through iTunes, on your device. – Vin Jan 18 '11 at 06:34
  • I am trying to load the Ad Hoc version of my app onto my iPod with no need of debugging. I was doing it fine before without this error, but I obviously have changed something. The app does load onto my device, but because this error appears, it makes me feel I have my settings messed up. I do not need it to run in debug mode, but it seems like that is what it is trying to do, and I'm worried that this incorrect setting will cause a problem when I submit to the App Store. – shohaku Jan 18 '11 at 06:45
  • 1
    Why do you have to "Run" the application when you are just creating a distributable? You just have to create the .app file and drag and drop it onto iTunes for deployment on your iPod. You are getting this problem because you are trying to run the app(signed with distribution credentials) on your device. – Vin Jan 18 '11 at 11:20
  • Ha, so the problem was my expectations of what should happen. Thanks! – shohaku Jan 20 '11 at 03:39
  • Thanks Vin. Xcode will install it for me but I can't 'Run' it from Xcode. If I simply go to my device though and double tap my app then it runs fine. – Stephen Watson Jul 31 '13 at 13:04
  • Thank you thank you, thank you for mentioning that this should be set in both project as well as target!! I had a conflicting setting but was unaware of that. Finally hours of trying have come to an end! – Martijn de Milliano Apr 25 '14 at 22:01
2

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

Yiğit
  • 166
  • 2
  • 9