iOS Application Deployment

iOS Application Deployment Preparation to an iOS Device during Development

To limit who can install an iOS application on an iOS device during development, prepare the following 3 artifacts

  • Certificate signing request (CSR)
    • A request to generate a development certificate to identify a developer
  • Development certificate
    • Installed into a computer's keychain
    • Use to sign the iOS application
    • Otherwise a target built to a iOS device will fail
  • Provisioning profile
    • To install an iOS app signed with a development certificate, a valid provisioning profile must exist on the device

Detail steps:

  • Sign up for the Apple Developer Program - Standard Program cost $99
  • Obtain the Device Id
    • Connect your device to a Mac and start Xcode
    • Select Window -> Organizer
    • Select the Device Tag
    • Select your device and locate the device identifier
  • Create a Certificate Signing Request (CSR)
    • On the Mac's Launch Pad, select Utilities -> Keychain access
    • Select Keychain Access -> Certificate Assistant -> Request a Certificate from a Certificate Authority ...
    • Select Saved to disk
  • Generate the Developer Certificate and Provisioning Profile
    • Login to the Apple iOS provisioning portal
    • Select Launch Assistant to create the Development certificate & Provisioning Profile
    • Enter the name of the application, the device Id & the CSR file when asked
    • Tips: use the email addresses as the device name for the provisioning profile
    • Download the Provisioning Profile when asked
    • Connect the device onto a Mac
    • Drag and drop the downloaded Provisioning profile onto Xcode in the Dock to install the profile on the device
    • Back to the iOS Provisioning Portal page to download the developer certificate
    • Double-click on the downloaded certificate to install it into a keychain
  • Install Application on to the Device
    • Back to Xcode
    • Select the correct device on top left
    • Hit run

Developer Certificate only need to be done once

To download an existing provisioning profile onto a device

  • Add the new device Id onto the existing provisioning profile in the iOS Provisioning Portal
  • Install the provisioning profile using Xcode
    • Select Window > Organizer
    • Select Devices
    • Select Provisioning Profiles
    • Select the Automatic Device Provisioning
    • Plug in the device
    • Select device & "Use for Development"
  • Or download the profile, and install it in the devices organizer by dragging it to Xcode in the Dock

Archive, Share & Submit iOS Application

Select the build target and make sure the skip Install setting is Yes in the Release build configuration

Archive an iOS application

  • In Xcode, select Product -> Edit Scheme
  • Select Archive.
  • Choose a build configuration
  • Select Product -> Archive

Share an archive

  • In Xcode, select Window -> Organizer
  • Select Archive
  • Select the application archive to share and click Share
  • Specify the archive saving location
  • Send the shared archive to the requester

Install iOS application from an archive

  • Double-click the application archive
  • It opens in the iTunes Applications list
  • Sync your device with iTunes

Submit iOS application to Apple iTune Connect for testing & publishing

  • Create a distribution provisioning profile in the iOS Provisional Portal
    • Distribution method: App Store
    • Profile name: <Application_Name> Distribution Profile
  • Download the distribution profile and install it in the devices organizer
    • Drag the file to the Provisioning Profiles list in the Library section of the devices organizer
  • Submit the iOS application
    • In the archives organizer, select the application archive and click Validate