Making Sencha Touch + PhoneGap iOS Apps Available to Beta Testers

This is part 4 of a 4 part series.

After you’ve successfully compiled your app in XCode, you’ll want to make it available to beta testers. There are three methods that you can use to accomplish this.

1) Use an Ad-Hoc Distribution Method
2) Use an Ad-Hoc Distribution Method in combination with the TestFlight service to facilitate “over-the-air” (OTA) installs
3) Register for Apple’s iOS Enterprise Developer Program and distribute your app “over-the-air”

Using the Ad-Hoc Distribution Method

The Ad-Hoc distribution method enables testers to install your app on up to 100 devices.  You’ll need to use this technique if you aren’t a member of the iOS Enterprise Developer Program ($299 annual fee). Users will need to email you their device’s UDID so that you can enter them into the provisioning portal.

Using this distribution method involves completing the following steps:

  1. Acquire the UDID of the beta-tester’s device
  2. Registering devices with the Provisioning Portal
  3. Create a distribution certificate, if none exists
  4. Create an Ad-Hoc Distribution Provisioning Profile
  5. Build an App Archive
  6. Code-sign the app using the Ad-Hoc Provisioning Profile
  7. Post the app to a webserver for download.

Acquiring a Test Device’s UDID

The steps that a user must perform to retrieve a device’s UDID are as follows:

  1. Tether the device to their laptop/desktop computer. iTunes should automatically launch.
  2. Click on the Devices button in iTunes (illustrated by Step 1, below)
  3. Click on the tethered device (illustrated by Step 2, below)
  4. Click on the Serial Number (step 3) – note that this is actually an invisible button. And no, I’m not making this up. The serial number will magically transform into the device’s UDID.
  5. Right-click on the UDID and select Copy Identifier (UDID). This will place the UDID onto the user’s clipboard.
  6. Paste the UDID into an email and send to the app developer.

itunes

Registering a Device with the Provisioning Portal

Once you, as the developer, have the beta-tester’s device’s ID, you should perform the following steps:

  1. Log into the provisioning portal
  2. Click on the Certificates, Identifiers & Profiles link
  3. Click on the Devices link
  4. Click on the [+] to register a test device. Enter the a description of your tester’s device, and paste the UDID that they sent to you in an email.

a3

Creating a Distribution Certificate

If you haven’t already done so, you’ll need to create a distribution certificate  as described by the following steps:

  1. Click on Certificates > Distribution
  2. Click the [+] to add a new certificate
  3. Select Distribution > App Store and Ad Hoc
  4. Click Continue
  5. Follow the steps to create a certificate signing request (CSR). Click Continue.
  6. Select your CSR and click Generate
  7. Click the Download button to download your certificate
  8. Double-click on your downloaded certificate to install it into KeyChain Access.

Creating an Ad-Hoc Provisioning Profile

  1. Return to the provisioning portal
  2. Click on Provisioning Profiles > All
  3. Click the [+] button
  4. Click on Distribution > Ad Hoc as illustrated below:Adhoc
  5. Click Continue
  6. Select your App ID and click Continue
  7. Choose your iOS Distribution certificate and click Continue.
  8. Choose the devices that you want to use for testing your app as illustrated below:devices
  9. Click Continue
  10. Name the profile as illustrated below and click Generate.adhoctest
  11. Download the resulting .mobileprovision file and then double-click to install it into XCode Organizer

Building an App Archive

You must now compile your app into a .ipa file by completing the following steps:

  1. Open your project in XCode
  2. On the Project Summary tab, illustrated below, enter a version number for your app (typically 1.0)a4
  3. Click on the Build Settings tab
  4. As illustrated below, verify that your Code Signing Identity for app Release is set to the distribution certificate contained in your Ad Hoc Testing provisioning file.a5
  5. Choose Product > Archive from the XCode menu. After you are prompted to code sign, your archived app should appear in Organizer as illustrated below. Note: If you get a build error “Command /usr/sbin/chown failed with exit code 1”, this indicates that you have a permissions issue with your xcode project directory. You can fix this by issuing the following command:
    sudo chown -R [your osx account] [xcode project foldername]

    e.g.

    sudo chown -R stevedrucker notifications

    a6

Distributing the App

  1. In Organizer, click on the Distribute button
  2. Click Save for Enterprise or Ad-Hoc Deployment
  3. Click Next
  4. Select your Ad-Hoc Testing Code Signing Identity and click Next. Your application will be codesigned.
  5. As illustrated below, click on the Save for Enterprise Distribution checkbox and fill in the URL of where you intend to post the app.a7
  6. Click Save.
  7. This will generate a .ipa file and a .plist file.
  8. Upload the .ipa file and .plist file to your web server.
  9. Configure your web server to support the following mime types:
    .ipa   application/octet-stream
    .plist application/xml
  10. Create an HTML page that contains a link that the user can click on in order to install the app. The hyperlink should be similar to the following:
    <a href="itms-services://?action=download-manifest&url=http://training.figleaf.com/FigLeafNotifications.plist">Click here to download app</a>
    

Using a Third-Party Distribution Service

If you don’t have a webserver from which to distribute your app to testers, you can use a third-party service, such as TestFlight. TestFlight enables you to upload your ad-hoc provisioned app and generates a URL from which your testers can download and install the app. It also provides reporting metrics on who has installed the app, as well as notifies your testers whenever an update is available. It also enables you to revoke access to builds. By integrating the TestFlight API into your app, you can also quickly add customer feedback and review metrics on usage activity and crashes.

a9

In order to use TestFlight, your testers must download and install the TestFlight app. While the installation process is quite smooth, you should send a note to your testers informing them of this requirement.

Distributing to an Internal Enterprise

Clearly, the major sticking point with the aforementioned procedures is Apple’s requirement that you register the UDID of each test device. You can bypass this requirement by applying to Apple’s iOS Enterprise Developer Program. Membership in this program enables you to generate an “in-house” provisioning file that does *not* require registration of test devices.

a10

Once you have generated an In House provisioning file and installed it into XCode, you can complete the steps described previously under the heading “Distribute your App”, but use your in-house credential instead of an ad-hoc credential to code-sign the app.

Now that wasn’t too complicated, was it?

If you need help with your project or would like to be trained in the fine art of app development, please contact us at info@figleaf.com

One thought on “Making Sencha Touch + PhoneGap iOS Apps Available to Beta Testers

  1. Pingback: Building a Notification App for iOS with Sencha Touch and PhoneGap – Part 1 of 4 | Druck-I.T.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s