The Apple documentation will help you a lot in preparing and submitting the app to the App Store. But, as I have experienced it myself long time ago, it could be a confusing and unclear steps to do this because there are no pictures to guide you through it and, some of the terms maybe totally new to some of you, noobs.
So, this tutorial will hopefully help you to submit an app to the appstore using XCode 4.3.1.
1. After you completed your app, tested it in the simulators, the first thing you need is app icons. Create 6 app icons as follows in your image editor (MAKE SURE THEY ARE NAMED EXACTLY AS BELOW - Their names are case sensitive! icon.png and icon.PNG and Icon.png are all different!)
1. Icon.png - 57 x 57 pixels
2. Icon-Small.png - 29 x 29 pixels
3. Icon@2x.png - 114 x 114 pixels
4. Icon-Small@2x.png - 58 x 58 pixels
5. Icon-72.png - 72 x 72 pixels (for iPad) - optional
6. Icon-Small-50.png - 50 x 50 pixels (for iPad) - optional
Once you are done, copy these icons into your project folder and drag and drop them to your Projects' Resources Folder to include them in your project.
Then open the project's plist file (App-Info.plist, or info.plist) and add a row of "Icon files" (right click and select Add Row), then type Icon files in the field. Press return and you will see the line becoming an expandable list. Click on the triangle to expand it and then you can start adding the Items and icon file names such as below:
2. Next make sure you have included the "Loading" image called Default.png and Default@2x.png into your project. You do not need to specify these anywhere because the SDK will recognize them through their names. The loading image is the image that shows at the beginning of an app execution.
A bundle identifier is basically some sort of signature of your application binary. It can be any kind of string. But typically, it is of the type com.yourcompany.yourappname. For example, if your app is a flashlight app named myFlash, and your name is David Beckham, your Bundle identifier could be com.beckham.myflash. For another example, Apple's bundle ID is com.apple.iphoto for the iPhoto app. So now you get what a Bundle Identifier is, go on and open your app-info.plist again and enter your bundle identifier in the Bundle Identifier row.
5. At this point your app is just half way from submitting to app store. Next we need to go to the developer's portal and
a) create an App ID and assign Bundle Identifier to it,
b) create Development Provisioning Profile, (so you can test your app in your device) and
c) create Distribution Provisioning Profile (so you can submit your binary to appstore).
By this time, you should know that there are 2 MAIN WEB TOOLS for Developers that Apple provides: 1) iTunesConnect. 2) Apple Developer Portal.
To create an App ID, you need to enter the Apple Developer Portal (http://developer.apple.com). Then choose iOS. From there, you have to login using the same username and password as your iTunesconnect webtool. This tutorial concentrates on the XCode side, so I'll just briefly explain how to do the above a), b) and c).
a) To create an App ID, once you are logged on to Developer Portal, click the iOS Provisioning Portal link. In the left column, there are Home, Certificates, Devices, App ID, Provisioning, Distribution. To create App ID, click App ID link. At the right top side, there is a button App ID. Click on that and fill in all the necessary info in the form.
Description: enter whatever name you want for your app ID. This is what will appear in your XCode later. I normally use "<AppName> AppID".
Bundle Seed ID: just leave it as it is. (Default is Use Team ID)
Bundle Identifier: type the identifier you chose in step 3 above. After that just click Submit. Now your app ID is ready.
b) To create Development Provisioning Profile, now in the same page, click "Provisioning" link on the left column. In here, you will see a few tabs, Development, Distribution , History, and How To. Note that How To contains a very good info with detailed step by step on how to do provisioning. In fact, each of the sections (Certificates, Devices, App ID, Provisioning and Distribution) has a How To tab. So if you are stuck, read the info in there.
Under Development tab, click New Profile. Then enter the info in the form.
Profile Name: Enter a name (something like the app ID description). I normally enter "<AppName> Dev" to make it clear that the profile is a development profile so I can select the correct profile in XCode later on.
Certificates: Tick your company certificate. (If you don't tick, your provision will not be able to sign)
App ID: Select the app id you just created in step a.
Devices: Tick the device you want this profile to link to (i.e only devices you tick will be able to run your app during development and testing). (Adding Devices tutorial is not included here, but you can easily add it by clicking the Devices link and follow the info in How To tab.
Then click Submit and wait for a while and REFRESH the window and you'd be able to download the profile into your mac (Click on the button Download on the right side of the Provision list).
c) To create Distribution Provisioning Profile is EXACTLY the same steps as b) except that you do not need to choose the Devices (the devices options should be disabled).
Once you have created all the necessary provisions (normally just these 2 profiles = 2 files), 2 files should be already downloaded to your mac. To install, just drag and drop them onto your XCode icon in Dock. The Organizer will automatically opened and your profiles should be listed there.
6. Next is for you to choose a product name for your binary. Product name will appear in the user's device right under your app's icon. There is a limit as to how long the name can be, because if it is too long, then it will show as "MyApp...ion". Something like that. So choose the name carefully, and you can test it in your simulator. To input a Product name to your app, select your Project in the left pane of XCode and select the Build Settings of the TARGET in the right pane as shown below. Make sure you select All button and Levels button under Build Settings:
Then, In the search box, type "Product Name" and return. An entry will be shown, so you just enter your app name in there. Here is an example of my app called Everlight.
7. In the latest XCode, we need to add Architecture info correctly otherwise iPod Touch or older iPhone will not be able to run your app. While in the same page of XCode as in step 6, Search for Architectures (or you can just scroll up to find the Architectures entry. Click on the up-down arrow and select Others...
A window will pop up. Here $(ARCH_STANDARD_32_BIT) means armv7 (i.e the chip that iPhone4 and 4S uses). However iPhone, iPhone 3G, 3GS and iPod all uses armv6. So you need to add it by clicking the + button at the bottom and key in armv6. The order which is first is not important.
8. Now scroll a bit down, and find Code Signing entry. Here you must select the proper profiles. Make sure you select for ALL EIGHT entries like in the screenshot below.
Every single entry should be in BOLD indicating they are correctly selected. If any one of it is not in BOLD, you can try select "Don't Code Sign" for all EIGHT ENTRIES, and then select your profile again for all eight entries. Here is where your Profile Name is useful because when you click the up/down icon on the right of each entry, a list will pop up with all of your available profiles. For Debug row, choose your Development Profile. And for the Release row, choose your Distribution Profile. We are almost done!
9. Next, Click the Summary page of your project's Target as screenshot below:
Here you can verify your Bundle Identifier. Make sure they are matched case per case to the Bundle Identifier you chose earlier. Bundle Identifiers are case sensitive. Here you can also see your Version number. For Devices, select iPhone, unless you just made a universal app or an only iPad app.
Deployment Target - This is a very important settings. Deployment Target indicates what is the minimum iOS version that a user needs to run your app. A common practice is to allow a support to the lowest possible version, for example, iOS3.2. or 4.0. If you set to 4.0, a user with version 3.2, will not be able to download/buy your app. But a user with iOS4.0, 4.1, 4.3, 5.0 and above will be able to do so.
Supported Device Orientations - Select which orientations that your app support.
App Icons: Should show you your icons properly. And Prerendered option is if you do not want that gloss effect to be added to your icon.
Launch Images: Default.png and Default@2x.png should appear here. If not check back your file name properly.
10. Now you're ready to Submit to App Store. Well, not just yet. You need to add a new application in iTunesConnect Dashboard first! Logon to iTunesConnect and goto Manage Applications and click Add New App button on the top left. Next select the Default Language (English normally for me), and key in your the following:
App Name: App name must be unique, and not a duplicate of those already existed in AppStore.
App name cannot be changed once your app is approved so choose carefully. However you can change the app name at an app update later on.
SKU Number: This is for your own personal use in the Sales report that Apple will produce. For example, my photo app SKU is called PH-0001. You must decide this for yourself because you will be using the SKU to identify your app in the Sales Report.
Bundle Identifier: You should know this by now. If not, read back from start of this tutorial :P
Click Next and enter the following info:
Availability Date: Don't change it if you want it to be available right after it has been approved.
Price Tier: Select a Price for your app. Tier 1 is 99cents. Tier 2 is 1.99 cents and so on. After you select the Tier, you'd be able to see in a table how much does the Tier represent (if not, click View Pricing Matrix)
Discount For Educational Institution: Tick this if you want educational institution (like university or school) to be able to bulk purchase your app at a 50% discount. For example if your app is 99cent, then if the school purchased 100 copies of your app, they'd just pay $49.50, which is a motivation for them to bulk purchase more.
Click Next, then you can enter your typical app data: Version Number, copyright, Primary and Secondary Categories, App Rating, MetaData, iTunes Artwork Icon and Screenshots. I'm sure you are already familiar with this. But a little important notes:
1. Enter the version number correctly. If the version number entered here does not match to the one entered in XCode, you won't be able to upload your app.
2. If you haven't prepared Metadata, iTunes Artwork Icon and Screenshots, you can just prepare a "Dummy" images first (iTunes Artwork Icon = size 512x512px , 1 dummy screenshot of 960x640) and upload them, and just type some dummy words in the Description section (like "will add later") at this point because otherwise you won't be able to finish adding a new app data to iTunesConnect!
Finally Click Save and your app data in iTunesConnect is ready and you can now upload your app via XCode. Go back to XCode, open your project , go to XCode menu Product -> Archive.
When you click Archive, Organizer will be fired again showing archives of apps. Select your app name and click Validate. You will need to login with your iTunesConnect account and XCode will analyze your binary for any possible errors or missed items. Once validation is a success, XCode will tell you and you can submit by clicking the Distribute.. button and select "Distribute to AppStore". The similar process will happen again and just wait for the upload to finish.
DONE!
Easy steps? Not really. Worth it? DEFINITELY!
GOOD LUCK!