Try the search, it's linked to some great forums

Thursday, December 27, 2012

iOS App Build process

Builds

Here is a list of the devices we want to target: Devices
Our Deployment Target should probably be iOS 3.1.3 if we want to be as open as possible, including 1st generation iPhone and iPod Touch.
Otherwise the next step up would be 4.2.1 which would get us 2nd gen iPod Touch and iPhone 3.
The only other real option is 5.1 which gets us iPad 1, iPhone 3GS, and iPod Touch 3rd Gen.

Build Process

  1. Prepare Code
    1. Get latest code from master branch on Github.
  2. Prepare Code Signing Identity
    1. Visit the iOS Provisioning Portal and make sure you have a Distribution Certificate with the appropriate UDIDs and Bundle ID.
    2. Download the Distribution Certificate and add import it into Keychain (double-click)
  3. Prepare Ad-Hoc Provisioning Profile (AHPP)
    1. Visit the iOS Provisioning Portal and generate an Ad Hoc Provisioning Profile (AHPP)
    2. Download the Ad Hoc Provisioning Profile and add it to XCode Organizer's Provisioning Profile section (double-click)
  4. Prepare Build Directory in Dropbox
    1. You should create a new directory under "Dropbox/xxxxApp/Builds/" with the date in the format YYYY-MM-DD
    2. In this directory, place a copy of the AHPP
  5. Sign, Clean, Build, and Archive In XCode 
    1. Project Settings, Code Signing section, set the Ad Hoc Distribution Code Signing Identity to the AHPP just created.
      1. Do this for both "Any SDK" and "Any iOS SDK" options.
      2. Do this in the settings for both the Project and the Target.
    2. From the Scheme Selection menu in the top left, select "xxxApp > iOS Device"
    3. Select menu Product / Clean.
    4. Select menu Product / Build For / Archiving.
    5. Select menu Product / Archive.
  6. In Organizer
    1. Select the Archive you just created and click the "Distribute..." button.
    2. Select the "Save for Enterprise or Ad-Hoc Development" radio button and click Next.
    3. In the pulldown menu which appears, select the Code Signing Identity you wish to use to sign this archive for Ad-Hoc Distribution.
      1. The bolded name will be the Distribution Certificate Identity, but the gray text underneath it should show the name of your AHPP.
    4. Click next and then choose a location to save the .ipa archive. 
      1. Save the .ipa in the build directory your created next to the .mobileprovision file (the AHPP) used to sign the Archive.
      2. For a filename, you should match the format of the AHPP but with the .ipa extension and the correct build number.
        1. For instance, if your AHPP was named "TTAlpha 0 8" then your AHPP file should be "TTAlpha_0_8.mobileprovision" when you download it, and you should save the Signed Archive as "TTAlpha_0_8.ipa"
        2. If another build is issued, 0.8.1, then TTAlpha_0_8.mobileprovision can still be used to sign TTAlpha_0_8_1.ipa
  7. Add an item to the list below, including a link to the Builds subdirectory you created in Dropbox with both the .ipa and .mobileprovision file.
    1. Shareable Dropbox links can be copied from the website or right-click menus.
  8. Notify partners and testers that a new build is available.