iPhone project: failed to upload .app error in Xcode

Problem: I face a problem running a debug built application on an iPhone 3.1 device from Xcode 3.2.5 (iOS SDK 4.2). I receive the error message “Failed to upload my.app”. The app is actually uploaded but cannot be run. There is no error message in either device’s console or in the Xcode’s one. The application runs perfectly in the simulator and it runs without errors on iPad or iPhone 4GS devices. Proper .mobileprovision file is installed. What do you recommend? Answer: It happens. 1. Quit from Xcode (for whatever reason). Most of the problems disappear after a restart, so run it again. Rebuild and upload your app. 2. If the symptom is the same, your app is probably in error. Look at the differences of iPhone 3GS and iPhone 4GS. Find your Info.plist and check out your settings. Are you absolutely sure that the Main nib file is available for the iPhone 3 device? I suspect you missed something here. Typical configuration:
Your device may not find Main nib
Note that in Info.plist (iPhone) = iPhone 4, (iPad) = iPad device
Links: How to build and submit iPhone app to AppStore with Xcode 4