iOS: Failed to launch .app file

AlienMonkeyCoder picture AlienMonkeyCoder · May 31, 2012 · Viewed 12.8k times · Source

I don't know why it is looking for directory inside my .app file. Every time I run application it installs the App on iPhone but doesn't run and gives below error. Could anyone please tell me where's this settings stored? Thanks.

error: failed to launch '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp- ccbvvzjjzvwuerchrpulknxtenoq/Build/Products/Debug-iphoneos/MyApp.app/MyApp' -- No such file or directory (/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-ccbvvzjjzvwuerchrpulknxtenoq/Build/Products/Debug-iphoneos/MyApp.app/MyApp)

Answer

Mat picture Mat · May 31, 2012

Try with:
1 - remove the app from the iPhone.
2 - remove the contents of the DerivedData folder.
3 - Clean & Build the project, restart Xcode, and reboot your device.

EDIT:
Now for the step 2 in Xcode 5 you can delete the derived data from the Organizer, just select the Projects tab, select you project and click the "Delete…" button on the right.