Getting Certified with Apple
I’ve had no end of trouble trying to get an app we’ve built for a client into Apple’s App Store. Build the app was quite simple but Apple have a certification process which involves their developers to download and install a number of certificates which do different things. Without this setup correctly, it’s near impossible to get you app in Apple’s App store. So, to make things easier for me next time I have to do this, I’d thought I’d record the whole process.
Before you start:
You’ll need to make sure you’ve signed up to Apple’s Developer Program. This has a yearly fee of roughly $100US attached to it.
Step 1 – Grab the SDK
Download the latest SDK from https://developer.apple.com/iphone/index.action
This file will be about 2GB, so whilst that’s downloading, move on to step 2
Step 2 – Get up to date
Update your iPhone. You’ll want to make sure that your SDK and iPhone are targeting the same iOS version as it helps simplify things.
Step 3 – Install the SDK
Install your newly downloaded SDK
Step 4 – Log into iTunes Connect
I next logged into developer.apple.com, clicked my way through to iTunes connect (itunesconnect.apple.com) and downloaded the iTunes Connect Developer Guide (https://itunesconnect.apple.com/docs/iTunesConnect_DeveloperGuide.pdf). This PDF provides a lot of good notes to supplement this walk through.
Step 5 – Create your Icons
The iTunes Connect Developer Guide likes you to get your graphics setup first. Having had my app rejected automatically a few times due to not having these setup correctly, I encourage you to take the time to create all the different versions of your App’s icon. I opened up Photoshop and created 5 new files with different dimensions:
57×57 – iPhone (3 + 3GS + touch)
114×114 – iPhone 4
50×50 – iPad
72×72 – iPad
512×512 – App Store
I saved each of these out as 24bit PNG images use’s Photoshop’s Save for Web. It’s also important to make sure you have transparency switched off. You can probably use any naming convention you like but I opted to name the files 57×57.png, 114×114.png.. etc to make things a little easier when I need to reuse these images later.
Apple also provide a way of controlling whether or not your icon is automatically made shiny! This parameter is called UIPrerenderedIcon key. My intent is to leave this as the default which should add a glossy shine to my app icon but you can look further into this if it’s something you think you’d like to control.
Step 6 – Create your Screen Shots
The app store needs a few screen shots to encourage people to download your app. There are a few ways to approach this but I’m just going to grab a few screenshots from my app running in the iPhone emulator.
Just like the icons, you’ll need a few different size formats for both iPhone and iPad. I’d suspect you’d only need to include the screenshots for the platform you’re targeting, so if you’re not providing an iPad version, then you can probably omit these. I am however looking at supporting both.
iPhone/iPod Touch Screenshots
320×460 PNG – Standard
640×920 PNG – High Definition for iPhone 4
iPad Screenshots
768×1004 PNG – Standard
I should clarify that this is the minimum requirements and there are other options that can be explored here. However, if you are just looking at satisfying Apple’s requirements in order to get you app accepted into the App Store, following these points will achieve this.
Step 7 – Banking and Contracts
We’re providing this app on the App Store for free which means I don’t need to provide Apple with banking details and the other bits and pieces associated with selling an app. If you are looking to sell your app, there is quite a lot of detail about it in the iTunes Connect Developer Guide: https://itunesconnect.apple.com/docs/iTunesConnect_DeveloperGuide.pdf
Step 8 – Users
If you are like us and are developing an app for a 3rd party, you can provide them with access to iTunes Connect so that they can see reports and other information about their app. By default the initial iTunes Connect user (your current account) has both Admin and Legal roles which is enough to get us through to the next step without doing anything. If however you wanted to provide access for you client, now is not a bad time to do it.
Step 9 – Certificates and Provisioning
This section has been my stumbling block from day one and the iTunes Connect Developer Guide provides no reference to this either, making it even harder to realise the importance of this step. So to get the certificates you needs, you’ll want to first point your browser here: https://developer.apple.com/iphone/manage/certificates/team/index.action
Once you’re in the Provisioning Portal, click on Distribution. This page has a lot of information about getting the certificates you’ll require to be able distribute your app in the App Store. There are 3 key things you need to distribute your app:
1. A distribution certificate
2. A provisioning profile
3. To CodeSign your app
To obtain your Distribution Certificate you’ll need to:
1. Launch your Keychain App
2. Ensure in your Preferences you have “Online Certifcate Status Protocol” and “Certificate Revocation List” both set to “Off”
3. Using the Certificate Assistant (Under the Keychain Access menu), select “Request a Certificate from a Certificate Authority…”
4. Enter in the email address you use to log in to iTunes Connect and the Name you’ve registered yourself/your business under
5. Don’t do anything with the CA Email Address (even though this says “Required”)… you’ll see why in a minute
6. Select “Saved to disk” and tick “Let me specify key pair information”, then click “Continue”
7. The defaults for the next screen are all good, click continue
8. You should now have a CSR (Certificate Signing Request) file on your desktop
9. Now go back to the Provisioning Portal and select Certificates > Distribution and click “Request Certificate”
10. Click “Choose File”, select the CSR on your desktop and click “Submit”
11. Now go back into Certificates > Distribution and right click the WWDR Intermediate Certificate link, select Download File… and save it to your Desktop. Now double click the file to install it.
12. Now click the Download button on the Distribution page – this will save to your Downloads folder. Go to this folder and Double Click the file to install it.
13. Return back to your Key Chain, select the “Keys” category, select the Private Key associated with your Distribution Certificate and then go to File > Export. Save this somewhere safe as you’ll need it should you ever want to save yourself from doing all of this again.
Now we have a Distribution Certificate, we can Apply for a Provisioning Profile! Follow these steps to do so:
1. In the Provisioning Portal, select the “Provisioning” section and select the “Distribution” tab
2. Click the New Profile button
3. Select the App Store radio button, Give your Profile a Name, Verify your Distribution Certificate (by just looking at it) and Pick the Wild Card App ID – in my case this was my name…! Now click submit.
4. Click back into the Distribution Tab of Provisioning and you should see a “Download” button. This will save a .mobileprovisioning file to your Downloads folder
5. Go to your Download folder in Finder and Drag the .mobileprovisioning file onto XCode in your dock. You’ve now installed a Provisioning Profile
Ok, with our Distribution Certificate installed in our Key Chain and our Provisioning Profile installed into XCode, all we now need to do is look at CodeSigning our app. To do this you’ll need to follow these steps.
1 . Fire up XCode and open your project.
2. Go to Project > Edit Project Settings > Configurations
3. Duplicate the Release Configuration and all it “Distribution”
4. Go to Project > Edit Active Target > Build and set the Configuration to “Distribution”
5. With this tab is a section called “Code Signing” and inside that “Any iPhone OS Device”. Change this to your Distribution Profile. If you don’t see your profile, check back over these steps again because something hasn’t been done correctly.
6. Now switch to the Properties Tab and enter the Bundle Identifier portion of your App ID – no idea what that is, me neither however there are a few rules that apply here and I believe that if you aren’t making use of Push Notification, In App Purchase or The Game Centre, you can then use a Wild Card (which you’ll be doing by default) and can then enter in something unique. The format is mean to be something like com.yourbusiness.yourapp – so that’s what I’m running with and will hopefully work for now.
7. Now go back to your Project Window (your main code window) and select “Distribution”
8. To allow us to run this, we’ll need to go to File > New select “code signing” and “Entitltements”
9. On the next screen, just click Finish
10. You should now be able to find your “Entitlements.plist” file in your Project Window
11. All going well you should now be able to Build your App for Distribution – It won’t actually run on anything but it will create a binary
12. If you now go to your binary file, right click it and compress it, you’ll be set to publish your app!
















