How to build and submit iPhone app to AppStore with Xcode 4

Question: Xcode 4 has made my life miserable. I am very familiar with Xcode 3.2.6 and have built and submitted several applications to the iTunes but now I am stopped at a very basic task. How to build the release version, find and compress the built iPhone bundle, and submit it to the AppStore with this X#2&% ? Answer: You are expected to spend some time to learn this brand new IDE. The build, verification and submission process is simplified: 1. iOS Provisioning Portal and iTunes Connect is the same. I assume you have downloaded the distribution .mobileprovision file and added to your project, and you have prepared your new app at iTunes Connect as well (i.e. your iTunes AppStore account is waiting for the app to be uploaded). 2. The Xcode 4 and Organizer and Application Loader have been integrated. Open the Scheme drop-down list and choose your application with iOS Device. See the screenshot below.
Select your scheme
Select your target application and iOS Device
Click on Edit Scheme… to look at the Archive option. By default it builds a Release bundle and will be revealed in the Organizer:
Select your scheme
Edit application scheme in Xcode 4
3. Check out your usual building settings (product name, info.plist, version, Target Device Family, iOS Deployment Target, Code Signing Identity etc.). 4. Find the Product menu -> Archive option to build the release version. When ready, the Organizer will pop up.
Build Xcode 4 Archive
Build Archive to be able to submit app to AppStore
The Organizer helps you manage your apps. You do not have to know any longer what folder your bundle is in. Xcode 4 and the Organizer takes care of all the file processes. Actually the build bundle is under a Derived Data folder of your project. The exact location is set in your Xcode preferences. See Xcode -> Preferences -> Locations tab. 5. In the Organizer select your new “archive” (in Xcode 3 language: the Release version of your app bundle). Validate it.
Submit Xcode 4 app
Validate and submit your app to AppStore
6. After successful validation Submit your app to iTunes. When finished its Archive status will be changed to Submitted. Notes: – In the Organizer the “Share Application…” option is for Ad-Hoc distribution and produces an .ipa file. Links: Archive verification error: “does not contain a single–bundle application or contains multiple products” “No architectures to compile for” building error Ad-Hoc App Distribution with XCode 4