So you've programmed your first iOS app and you want to get it uploaded and submitted to the iTunes store? Well, as I found out recently, it's not quite as easy as it sounds. The latest Xcode 4.2 development tools from Apple have certainly streamlined the process, but it's still a daunting task your first time around.

This is a very in-depth topic, and I can't possibly write a tutorial that will cover 100% of cases or every problem you might come up against. What I can do is give an overview of the entire process so you have an idea where you're getting stuck; some tips that might help you out on the way; and some pitfalls that kept me searching for days.

Getting Started

In case it isn't obvious, you need a paid iOS developer account ($99/year) in order to submit applications, free or otherwise, to the iTunes App Store. Ensure your Apple ID includes up to date information, and that the address is accurate. You will need to verify your address and identification details, usually by way of faxing a passport copy and utility bill. If in doubt, call developer support for your local country - I found the UK team were more than helpful in getting my old Japanese Apple ID transferred to a UK address.

I'm also going to assume you already have an app that's been tested on the simulator, with no bugs or memory leaks. Getting your app to that state may be a monumental task in itself, but I can't help you there. Crucially, make sure there are no serious compilation errors - though in my case there were lots of "semantic issues", those are acceptable. Test, test, and test again before you think you are ready for release. Adding icons and debugging code is outside the scope of this tutorial, I'm afraid.

Here's a quick summary of the whole submission process:

  • Create a unique App ID for your app and change your bundle identifier in Xcode
  • Create a secure Distribution Certificate for yourself
  • Create a Provisioning Distribution Profile for the app
  • Code-sign your app with the distribution profile
  • Archive it, ensuring Project is set to Skip Install-> Yes and Target is set to Skip Install -> No
  • Create an App on iTunes Connect with your meta data and sales information.

Most of this occurs within the Provisioning Portal, XCode, Keychain Access utility and iTunes Connect.

Create An App ID

  • First, you need to create an App ID - a unique identifier for your app. Head over to iOS Provisioning Portal - the link is one the right side once you've logged into the iOS Developer site, and choose App ID from the sidebar.
  • Click the button to create a new app ID. The first description field is just a name for your reference. The bundle identifier is a kind of coded name for your app, usually written as your company domain (in reverse), followed by a dot and the app name. For example:

com.makeuseof.demoapp

how to submit itunes app
  • Over in X-Code, click Target -> Summary, and change the Identifier to be whatever you decided above (com.whatever).
how to submit itunes app store

Create A Distribution Certificate

This is a secure certificate stored on your profile which confirms your developer identity and signs your code. There's an elaborate version of this process detailed on the Distribution tab of the Provisioning Portal, but the simplified version is:

  • Open up Keychain Access, and turn off OCSP and CRL from the Preferences.
  • From the Keychain Access menu, choose Certificate Assistant -> Request Certificate from Authority.
how to submit itunes app store
  • Enter your email address (no CA email needed), choose Saved to Disk and Let me specify key pair information, then Continue
  • Choose key size of 2048 bits, and RSA algorithm, Continue.
  • This creates a .CSR file on your desktop.
  • In the Provisioning Portal, choose Certificates -> Distribution -> Add Certificate, and upload the file created.
  • It may take a few seconds to approve. Download and install the WWDR intermediate certificate in the mean time (just download, double click it).
  • Refresh the page, and you should be able to download your certificate. Again, install it.
how to submit itunes app store
  • As a final step, open up Keychain Access, highlight your private key that you just installed and select Export Item from the menu. Keep this key safe with a backup somewhere, as without it you won't be able to submit apps in the event of an OS reinstall or on different systems.
submit app to itunes

Create A Distribution Provisioning Profile

Yes, there are an endless number of certificates and profiles that need to be made here. Bear with me.

Again, from the Provisioning Portal, select Provisioning -> Distribution and create a new profile. Choose App Store as the distribution method, a profile name, and choose the App ID you created earlier. Submit that, refresh a few seconds later, and again download and install the profile - this time it will be added to XCode, but there are no further steps needed here.

If you want, you can check it's there from the Window -> Organizer -> Devices tab, and select Provisioning Profiles from the sidebar.

Check Code Signing & Build Settings

As a final preparatory step, open up XCode and find Code Signing in the Build Settings area. Ensure that the Release option (for both Project and app Target) has your Distribution Profile selected (the one you installed just now).

submit app to itunes

Select iOS device as the build scheme, and move on to Archiving.

Archiving Your App

Nearly there! Before you can actually submit your app, you need to create an archive of the whole project - the final set of files that will be uploaded to iTunes Connect. Assuming everything has been done correctly until now, the first step is check you have an Archive scheme to build the release version with.

Click on Edit Schemes from the top-left, and either make sure the Archive one is set to Release, or create one now with the appropriate settings. Using the Auto-Create Schemes function within manage schemes should also create this for you.

Next - and this is the bit that really induced headaches for a week in my case - if your app uses external libraries of any sort, you need to change the Build Settings for the project to be Skip Install. To do this, click the main project (not the target) -> Build Settings -> type Skip into the search field, and ensure Yes is selected for the Deployment -> Skip Install option.

submit app to itunes

The TARGETS Build Settings for Skip Install should be No. Double check that - Project Skip Install, Yes; Target Skip Install, No.

This tripped me up because every tutorial I could find simply said "set Skip Install to Yes" - but with these both set to yes, the archive just mysteriously wouldn't materialize.

The final step then is to build your deployment archive to upload. Select Product -> Archive from the menu. Once completed, you should be able to find your app in the Organizer -> Archives section.

Create An App On iTunes Connect

iTunes Connect is the commercial side of the app store, which handles the actual sales of your finished app, which countries to sell in, description and screenshots etc. It's actually quite easy, but there's a lot of information to be filled out, and it's at this point that you'll decide whether to sell the app, give it away, enable iAds to be displayed, enter bank information, and sign any contracts needed for release.

To get started, just head to iTunes Connect and Add a New App. You'll need to choose the bundle identifier from the drop selection box (the com.whatever name you created earlier), but I won't walk you through the rest of this as it's really self explanatory - Apple will tell what's waiting to be done at every step of the way.

how to submit itunes app

Eventually, your app will be added, and be in the Waiting for Upload status, at which point you can go back to XCode Organizer -> Archives, and hit Submit to upload. You'll asked to log in and check which app it is you're uploading, and now you need to just wait for it to be approved - usually a few weeks.

This has been a totally new experience for me as I'm sure it will be for many of you also. Hopefully you've got a clearer understanding of the process now - personally I was a bit daunted by it all and found myself muddling through most of it. Is it as complicated as it sounds? Yes - but only the first time. And in fairness, it's this rigorous process that prevents insecure apps and malware from ever making their way onto the app store, so that's something I'm eternally grateful for.

Let us know your experiences submitting to the app store in the comments.