Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4 Error: Error Starting Executable

Tags:

xcode

ios

launch

I ran into problem with testing my app on iOS and Xcode when I am uploading it to my actual devices (iphone and iPad), and I'm wondering if someone knows the issue and can help me out:

Normally when I build my app on my devices, the app is installed and launched on my devices. But as I am preparing for submitting my first app I was testing around and changing the Bundle Identifier, App ID, and Development Provisions (so the issue may have something to do with it), and now, when I try to build my app on my devices, although it's installed on my devices fine, Xcode will not launch the app anymore. Instead, I got this error message:

Error Starting Executable. Error launching remote program: No such file or directory.

Does anyone know what the issue is? And What is this derived data folder about?

Much thanks!

like image 356
JusmanX Avatar asked Apr 09 '11 19:04

JusmanX


2 Answers

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.

like image 178
crazywood Avatar answered Sep 23 '22 04:09

crazywood


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).
like image 23
Sam Avatar answered Sep 23 '22 04:09

Sam