[Solved-3 Solutions] Xcode 4 Error: Error Starting Executable



Error Description:

Error Starting Executable. Error launching remote program: No such file or directory.
click below button to copy the code. By - ios tutorial - team

Solution 1:

  • This error some times happen due to incomplete “Restore” or “Sync” process of our device which keeps the .app files locked up.
  • What we did we had to jailbreak our device to go find the app under /User/Applications/XXXXX-XXXX-XXX/ and phisically delete the .app
  • For one of the apps it worked and for other one we realized it just does not run GDB automatically so the error message is totally misleading, so we set the GDB to manual and it worked and did not give me that error, but of course we have to run the app manually for the debug session to start.
  • It also may have required some other stuff that we did before like checking the provision profile, but this was the last step that made it work.
  • Before this we tried all the solutions did not work for me, and obviously simply deleting the app by holding down our finger on the screen did not work, as it removed the icon but all the files were still there. ( Since it was a development app not a downloaded App Store app )

Solution 2:

Running App from a Clean Slate

The problem did not resolve until we 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 our app’s build folder that is a child of “DerivedData”. To find this we can reveal our app in finder, then backtrack until we get to “DerivedData” folder and delete the folder above that like “MyApp-crazylongweirdletters”. Without this step (3), we could not debug, so this is a critical step and we must quit XCode before we do this step.

Notes:

  • The issue started happening when we modified the bundle id of the app.
  • 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).
  • we are doing a DEBUG build (not release / distribution).

Solution 3:

  • we got the same error by not having my code signing correct.
  • Go to our project > Targets > Build Settings > Check code signing for debug state.
 ios adding app

Learn ios - ios tutorial - ios adding app - ios examples - ios programs


Related Searches to Xcode 4 Error: Error Starting Executable