Xcode 4 Error: Error Starting Executable Xcode 4 Error: Error Starting Executable ios ios

Xcode 4 Error: Error Starting Executable


I have also faced that problem. I have closed, restarted Xcode; deleted the application from device and reinstalled it again, then the problem has gone.


Running App from a Clean Slate

For me the problem did not resolve until I did the following in this order:

  1. Delete the app from the device (Do this before trying to debug again)
  2. Quit XCode (Don't just close the project)
  3. Delete the app build folder (example path: /Users/myusername/Library/Developer/Xcode/DerivedData/MyProject-fhkaamuyvqhubaezinqbmxbnaufd/)
  4. Restart XCode
  5. Finally -- Try debugging again on the iOS device

The app build folder of step 3 refers to your app's build folder that is a child of "DerivedData". To find this you can reveal your app in finder, then backtrack until you get to "DerivedData" folder and delete the folder above that like "MyApp-crazylongweirdletters". Without this step (3), I could not debug, so this is a critical step and you must quit XCode before you do this step.

For some it appears simply restarting XCode does the trick, but not for me.

I only post this answer because the earlier answers did NOT work for me. Hopefully others banging their heads will find this and get a sigh of relief. :)

Notes:

  • The issue started happening for me when I modified the bundle id of the app.
  • My code signing is and was correct. My provisioning profile was the "Team Provisioning Profile" which should work for any app id (default for "iPhone Developer" automatic profile selector).
  • I was doing a DEBUG build (not release / distribution).


You cant debug (start from Xcode) an application signed with a distribution profile if I remember well... And then you get such messages, gdb failling to attach to process.