Publishing your application (iOS 4)

All of your programming will be for naught if you don’t sign up for the iOS Developer Program with Apple. This is a multistep process that can take quite some time, so make sure to get it all in hand well before you want to upload your program to the App Store.

Signing up with Apple

To get started, you must register as a developer at http://developer.apple.com/devcenter/ios/. When you register, you’re asked for some basic information about what you’ll be developing, and you need to sign Apple’s Terms & Conditions for working with the iOS. You’ve probably already done this step, because it’s required in order to get access to the SDK and the online documentation.

Sometime afterward—maybe in a few hours, maybe in a few weeks—you’ll get a call from Apple confirming your signup information and giving you the OK for the program. Apple will then send you an email that allows you to finish your registration. At this point, expect to pay a fee, currently $99/year (standard) or $299/year (enterprise), to become a full-fledged developer. The standard program allows for distribution via the App Store, and the enterprise program allows distribution of in-house applications to over 500 employees.

Compiling to the device

The first advantage of being a registered iOS developer is that you can compile programs directly to your device. This is fairly critical for certain types of testing. As you’ve seen in this topic, features like altitude detection, volume control, and the accelerometer don’t work correctly when tested in the Simulator.


To compile to a device, you must create a provisioning profile, which is a multistep process. You need to use some new tools that appear under a Program Portal link at the top of http://developer.apple.com after you finish your signup and pay your fee. Apple has a complete "iTunes Connect Developer Guide" that explains how to use everything here, but we’ll outline the main steps:

1 Add team members (admin) —If you registered as a company, you can add additional team members under the Team tab. The initial creator of a team is the Team Agent, who has the highe st-level powers in the Developer Program; other users are Team Administrators or Team Members. From here, individual members can set themselves up to compile to their devices, with some steps requiring interventions from Team Admins.

2 Create a certificate signing request (member) —This is the first step required to generate the certificate you need to sign (and thus run) applications on your device. You create a certificate signing request (CSR) inside Keychain Access on your Mac and then upload it from the Certificates > Development tab; a Team Admin must then approve it.

3 Download a certificate (member)—After your Admin (who may be you) has approved your CSR, you can download a certificate. From Certificates > Development, download the WWDR Intermediate Certificate, and double-click to install it. Afterward, download your developer certificate, and double-click to install it.

WARNING Your certificate will be permanently installed in your keychain; if you rebuild your machine or move to a new machine, you’ll lose it. To avoid this, be sure you export the private key associated with your developer certificate. You can then import it on a different machine, and redownload the two certificates from Apple. If you fail to do this, a Team Admin may need to revoke your certificate so that you can create a new one.

4 Add devices (admin) —Add any devices (iPhones, iPods, or iPads) that you want to build on using the Devices tab.

5 Create an app ID (admin)—Each application needs an app ID, which controls its access to devices. For the purposes of testing, you’ll probably use one general wildcard ID that you create by appending a wildcard (.*) to your app ID bundle identifier.

6 Create a provisioning profile (admin) —A provisioning profile is a unique combination of multiple developer certificates, multiple device IDs, and a single app ID. It’s what ties your device to your overall development profile and what allows you to run programs. You create a provisioning profile from the Provisioning > Development tab, at which point you’re asked to enter the three elements that make it up.

7 Download a provisioning profile (member) —Download the profile from Devices, and drag it your Xcode dock icon or the organizer window of Xcode.

Although the setup can be a bit extensive for an Admin, after the initial work is done, a member can create a CSR, download a certificate, and download a provisioning profile. From that point, the member can choose to compile onto a device rather than to the iOS Simulator by changing the pop-up window at upper left in Xcode.

Preparing for distribution via the App Store

Preparing your program for distribution via the App Store follows much the same process as preparing your programs for testing on iPhones on iPads, except that the steps can only be undertaken by the Team Agent:

1 Create a certificate (agent) —As before, you must upload a CSR, but here you should create a certificate from the Certificates > Distribution tab, rather than Certificates > Development.

2 Create a provisioning profile (agent) —Create a provisioning profile in the Provisioning > Distribution tab. It’s usually an App Store profile. As before, drag your new profile to Xcode.

3 Prepare to compile (anyone)—Create a new Distribution configuration that uses the distribution provisioning profile. Update other info in the configuration, update your Info.plist as appropriate, and then build.

4 Prepare media (anyone)—Prepare a set of 57 x 57 (required), 72×72(required), 114×114(recommended), 29×29(recommended), 50×50(recommended) and 58×58(recommended). PNG icons, a 512 x 512 JPG/TIFF large application icon, and full-screen portrait and landscape screenshots, as well as other information required by the App Store.

5 Upload (agent)—Go to the Distribution tab, and create the new app under iTunes Connect. Upload the binary file with Application loader.

6 Wait (everyone)—It will take some time for your application to be approved and go on sale.

These procedures may change over time; but for now, this is what you need to do to get your program from your desktop to the App Store.

There are also two alternative ways to distribute your software: enterprise distribution lets you distribute an in-house application to employees within your company, and ad hoc distributions let you distribute to up to 100 other users by email or a website. Both are explained further in Apple’s documentation.

Next post:

Previous post: