iPhone SDK: Install Apps on iPhone Devices for Development

iPhone SDK: Install Apps on iPhone Devices for Development

Tutorial Details
  • Completion Time: 30 - 60 Minutes
  • Difficulty: Beginner
  • Technology: iOS SDK

This tutorial will teach beginning iOS SDK users how to install apps on their iPhone OS hardware for testing and development.

App Install Requirements:

Step 1: Login to the iPhone Provisioning Portal

Login to your Apple Developer account by navigating to http://developer.apple.com/iphone. Once there, navigate to the iPhone Provisioning Portal.

iPhone Provisioning Profile

Step 2: Install the WWDR Intermediate Certificate

The first thing we will need to do is download the WWDR Intermediate Certificate. Once in the portal, click on “Certificate” in the sidebar and you will be presented with a link to download the “WWDR Intermediate Certificate.”

Apple iPhone WWDR Certificate

Download the file and double-click to add it into the Keychain Access program on Mac OS.

Step 3: Create a Development Certificate

Next, we will need to download a certificate for development. To get the development certificate, we will need to generate a “Certificate Signing Request” from within Keychain Access.

Open the Keychain Access program on your mac. It can be found under Applications > Utilities > Keychain Access, or just by searching for “Keychain Access” with Spotlight.

Open Utilities Keychain Access App

Once open, go into the “Keychain Access” drop-down menu in your menubar and select “Certificate Assistant” and then “Request Certificate from A Certificate Authority.”

Request Certificate Authority

A window will popup. Fill the window in with your information, but leave “CA Email Address” blank, and select “Save To Disk” from the radio buttons. Save it to a location that is easy to find, like your desktop, because you will need the file shortly to generate the certificate.

Self Sign iPhone Development Certificate

Head back into the “Certificate” section of the Provisioning Portal and make sure you have selected the “Development” tab. From there, press “New Certificate” and upload the request you made on your desktop. You may need to refresh the page in a few moments to change the status from “Pending” to available for download. If you are working as a team member on a larger project, you may need your manager to approve the certificate request.

Hopefully all went well, and you were able to create a certificate. Go ahead and download the certificate, then install it by double clicking the file or, if Keychain Access is open, drag the file over the Keychain Access icon in the dock.

Step 4: Create an App ID

Next we need an App ID. Return to the Provisioning Portal and select the “App IDs” option from the menu on the left.

There are two distinct App ID types to choose from.

One approach is to create an App ID for a single application. This will allow you to enable advanced features like In-App Purchases, Game Center integration, or Push Notifications. To do this approach, structure the bundle identifier as follows:

com.companyname.AppName

If you would like to create an App ID for a single application, fill out the screen as displayed:

Apps on iPhone Create App ID

The second approach is called a wildcard bundle ID. This approach will allow you to create an App ID that can be used for multiple applications that you would like to share a keychain between.

To take this approach, fill out the form as displayed:

Install Apps On iPhone: iPhone App COM Name

Step 5: Find & Add Your Device UDID

Select the “Devices” link from the left menu in the “Provisioning Portal.”

In-order to add a device, you will need the device’s unique device identifier, also known as the UDID.

To get the UDID, plug the device into iTunes and select your device in the list. In the device’s “Summary” tab, there will be a description called “Serial Number” next to the picture of the device. Click once on the serial number and it should change to “Identifier”, or your UDID. Copy your UDID to the clipboard. (Command + C on Mac/Control + C on Windows)

Apps on iPhone Get App UDID

Another approach is to simply download one of the many free “UDID” applications in the App Store, and e-mail or copy the UDID from that app.

After you have your UDID, click on add device from within the devices tab in the Provisioning Portal. Enter a name under “Device Name” and enter the UDID under “Device ID”.

Apps on iPhone Add Device UDID

Step 6: Create & Download Provisioning Profile

Now that you have added your device and made an App ID, we can generate a provisioning profile.

Select the “Provisioning” tab from the left menu. Make sure that the “Development” tab is selected, and click the “New Profile” button.

I named my new Profile “Developer”. Under certificate choose your development certificate, and under App ID, choose the ID we made in step 2. Under devices, select all the devices you have that you are going to use for development.

Press “Submit” to be brought back to the overview page for provisioning. Once on this page, if the status is set to “pending” you will need to refresh your browser before being able to select “Download.” If you are a team member on another’s account, you may need to wait for them to approve your certificate creation request. Download the certificate to continue.

Apps on iPhone Provisioning Profile Select

Step 7: Install Provisioning Profile

In this step, we will install the profile to your device and to Xcode.

Make sure your device is connected, and from your downloads folder drag the Provisioning Profile onto the Xcode icon.

Apps on iPhone Download Image

Then go into Xcode and open the organizer by going to Window > Organizer. There you should see your devices name on the left. Click on your device that has a green dot next to it and make sure it is allowed to be used for development, by clicking on “Use for Development” if it presents itself.

In the device summary info you should see a table called “Provisioning”. Drag and drop the provision profile from your downloads folder into that as well.

Step 8: Configure Build Settings

In this step, you will build your application to run on your device.

In your Xcode project, open the info.plist file from the “Groups & Files” pane. Fill in the “Bundle Identifier” value with the one created earlier and associated with the App ID.

iPhone Bundle Identifier in PLIST

Finally, select Project > Edit Project Settings from the Xcode menu bar or just right click or control click on the project file as shown below:

Project Info in Xcode

A new window should open. Select the “build” tab on this window.

Scroll down to the “Code Signing” section and select the correct provisioning profile identity from the drop down menu associated with the iOS device.

Step 9: Run On Device

Before you build and run, be sure to select “Device” from Project > Set Active SDK in the Xcode menu bar. Also be sure that you have selected the correct device from Project > Set Active Executable. Finally, be sure that your iOS device is turned on, connected to your computer, that it is recognized by iTunes, and that your screen is not locked.

You should now be ready to build, install, and run your first application on your iOS hardware! Click the “Build & Run” icon, and Xcode should take care of the rest.

Hopefully everything worked! Leave comments, questions, and feedback below.

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.webdesignertuts.com designertuts

    Very useful information indeed, it took me tow hours the first time i tried to do that :)

    thanks for spotlighting on this issue.

  • http://www.twitter.com/ubermatik Theo Hodkin

    This is gonna be REALLY helpful when I get started! Thank-you so much!

  • http://j0egas.com j0egas

    Great tutorial Will! Hope to see mroe from you!

  • eliot

    little things like this do irk me with apple, they give the software making software away for free, so you make some software but when you want to try it you have to spend money. its my hardware and my software who are you to get in the way.

  • http://www.amberweinberg.com Amber Weinberg

    Thanks for the tutorial, getting ready to submit my first app, so this is really helpful :)

  • http://taptouchclick.com Will Strimling
    Author

    Thanks for all the kind words!

  • http://www.iPhoneSDKResources.com Daniel O'Beid

    Great Tutorial Will!

  • http://eternalstarcraft.com Jason Schmidt

    Worked like a charm. Thank you!

  • ygal

    it work becuse you pay . it is to mutch to pay $99 for a year and for cupole of apps.

    i dont pay for this.

    i do it free………….

    • stan

      hi there, I am very new to app developing and would like to know how you do the provisioning for free! i have looked everywhere on the site but not found a thing on that

  • Carol

    Each time I try to compile this 1 app I’m working on, I’m told it can’t run on the phone… but click on “click and install” and it will install the provisioning profile for me. It doesn’t confirm that it did… but it must have… because the app then runs fine on this phone… *UNTIL* I compile it again… and I get the same question… and “click and install” again… and again… and forever.

    What do I have set wrong?

  • Patty

    What happens every 90 days when my certificate expires? Do I delete it and re-download the same 1 again, and reinstall it?

    Or do I keep it and just “update it” somehow?

    Do I delete it and regenerate a totally new one?

  • Jill

    Excellent tutorial. Does anyone have a *SIMPLE* explanation/diagram of what is the connection/relationship between a “developer profile”, a “distribution certificate”, an “App ID”, a “device certificate”, and all the others.

    Thanks!

  • Jill

    I tried to follow the example… but I compile… I get this:

    > warning: Application failed codesign verification. The signature was invalid,
    > or it was not signed with an Apple submission certificate. (-19011)

    What does it all mean? What does it all mean?

  • http://www.infrasoundkids.com L1

    Is there a way round this with Jailbroken phones? i.e. AppSync? I’d like to get into App Development, but not keen on spending $99 before I’ve even got a basic knowledge of it.

  • http://www.benpalmer.info Ben Palmer

    Great tutorial, thanks i’ve just added my iPhone and iPad to my Developer Profile and now i’m ready to install!

  • http://www.andreipotorac.com Andrei Potorac

    I got two problems.

    1. The organizer hanged on installing my device. I read on the net I have to disconnect and then connect again, clicking OK through the screens.

    2. XCode doesn’t let me use the * in the bundle profile. I think I have to go over that part again and set a unique name for my app. :(

    • http://www.andreipotorac.com Andrei Potorac
    • http://www.andreipotorac.com Andrei Potorac

      “There’s one more thing” :)

      On the iPad, it will ask you to click Install and Run, for the provisioning profile to get onto it. It didn’t just work by adding it in the Organizer.

      Now, I’m heading over to the Macbook Pro to see what steps are necessary to set-up the devices to work there as well. I think only the certificates would be required, but I’m not sure yet.

    • http://www.andreipotorac.com Andrei Potorac

      To use the Provisioning profile on two different MACs, all you need to do is export the two certificates from Keychain, and import them in the new MAC.

      Also copy the provisioning profile to the other MAC as well.

      When connecting the devices, they will collect the data already setup on the first mac, and after that you can compile the application. I assume you had the application settings done properly on the first mac, and simply copied the application on the second mac as well. Otherwise you need to set the Bundle ID again, if you don’t use the same source files.

      Hope this helps!

  • http://www.sugbloggen.se Sefan

    Thanks for this fantastic step-by-step manual. Worked like a charm. It´s people like you who make the Internet to a such fantastic and great forum for collaboration and learning. Keep up the good work!

    BR/Stefan

  • John

    Thanks!

    Been developing for some time…but ran into a little snag renewing and installing my provisioning profile to the device.

    Your guide solved the problem…

  • Chris

    Great tutorial. Would be awesome if it could be updated for Xcode 4.. A lot has changed.

  • http://ilikekillnerds.com Dwayne

    This article saved my bacon. I’ve been trying to get my environment set up for 4 and a half hours. Articles like this are why I am happy to pay for a premium tuts+ subscription.

  • subbu

    It is very use full .

    Thanks a lot.

  • http://caggie.info Caner

    Thanks for great tutorial.
    It really helped us.

  • http://tackytime.com Fille

    Great work. Bookmarked!

  • babykids

    i cant find any iPhone Provisioning Portal to the step? i have register a free account.

  • seenu

    thanks a nice tutorial

  • Enis

    I have 99$ account and followed all these steps, when I drag and drop profile to organizer, it shows: A valid signing identity matching this profile could not be found in your keychain.

  • Pravin

    Hi
    I need to know what methods people are using to distribute (internally) demo of ipad application wirelessly without having to manage UDID?

    I do not need a solution like testflight or betabuilder, all these requires me to manage UDID in the apple provisioning profile portal.

    I am asking this question because I am seeing another studio doing a much smarter way right now and I wish to know how they did it – With a link they gave to us, we can install their demo application from a simple html over the air, and a provisioning profile magically appears in my ipad. All this happened without me telling them the UDID of my ipad, and therefore definitely without them to recompile the project.

    How did they do it? Thanks!

    Note:- I have individual ($99) and enterprises ($299) account, please provide some tricks as well.
    Thanks & Regards
    Pravin Kulkarni
    IOS Developer
    +9109552520009

  • Saurabh

    Could u explain how to install paid app store apps for free using provisioning profile?!

  • Linish

    Very Well Explained Tutorial! Great Help!

  • Ajay

    Simply … Excellent work with Great Efforts !!!

    covering every aspect of creating the testing certificates to installing the app in device.It will really help the startup to gain deep understanding about it.