Setting up iOS Over the Air Download

iOS Over-the-Air (OTA) Downloads

labels: ota

In the past, one of the major annoyances of developing a native mobile application for iOS is distributing internal builds to enterprise users/beta testers. Using the ad-hoc distribution method, a developer has to create a release build (.ipa or .app) with provisioning profile (.mobileprovision) and send both the files to the users who then copies these files to iTunes and syncs their device to the computer. The users have to repeat this process each time there is a new build.

With the introduction of iOS 4, you can now utilize Over-The-Air (OTA) installation of applications. You can distribute in-house software to users without have them to use iTunes or iPhone Configuration Utility. Installing the app is simple, as users only need to download the manifest file from your website to their iOS 4 device, which instructs the device to download and install the apps referenced in the manifest. 

Requirements

• A web server accessible by users
• In-house iOS app in .ipa file format
• An XML manifest (plist) file, described in this document
• A network configuration that allows the device to access an iTunes server at Apple
• iPhone/iPod Touch running iOS 4.x and above or an iPad running 4.2 and above

Once all the requirements are met, follow these instructions:

1)      Make sure your website is configured to support the following two MIME types

  • .ipa application/octet-steam
  • .plist text/xml

2)      Build your manifest file

The manifest is an XML-based property list (.plist extension) and it should contain the following six key/value pairs:

  • URL — a fully-qualified URL pointing to the .ipa file
  • display-image — a fully-qualified URL pointing to a 57×57-pixel (72x72 for iPad) PNG icon used during download and installation
  • full-size-image — a fully-qualified URL pointing to a 512×512-pixel PNG image that represents the iTunes app
  • bundle-identifier — the app’s standard application identifier string, as specified in the app’s .plist file
  • bundle-version — the app’s current bundle version string, as specified in the app’s .plist file
  • title—a human-readable application name

 

Sample contents of a .plist file:

 

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <!-- array of downloads. -->
   <key>items</key>
   <array>
       <dict>
           <!-- an array of assets to download -->
           <key>assets</key>
           <array>
               <!-- software-package: the ipa to install. -->
               <dict>
                   <!-- required.  the asset kind. -->
                   <key>kind</key>
                   <string>software-package</string>
                   <key>url</key>
                   <string>http://www.example.com/apps/foo.ipa&lt;/string>
               </dict>
               <!-- display-image: the icon to display during download. -->
               <dict>
                   <key>kind</key>
                   <string>display-image</string>
                   <!-- optional. icon needs shine effect applied. -->
                   <key>needs-shine</key>
                   <true/>
                   <key>url</key>
                   <string>http://www.example.com/image.57×57.png&lt;/string>
               </dict>
               <!-- full-size-image: the large 512×512 icon used by iTunes. -->
               <dict>
                   <key>kind</key>
                   <string>full-size-image</string>
                              <!-- optional. icon needs shine effect applied. -->
                   <key>needs-shine</key>
                   <true/>
                   <key>url</key>
                   <string>http://www.example.com/image.512×512.png&lt;/string>
               </dict>
           </array><key>metadata</key>
           <dict>
               <!-- required -->
               <key>bundle-identifier</key>
               <string>com.example.fooapp</string>
               <!-- optional (software only) -->
               <key>bundle-version</key>
               <string>1.0</string>
               <!-- required. the download kind. -->
               <key>kind</key>
               <string>software</string>
               <!-- optional. displayed during download; -->
               <!-- typically company name -->
               <key>subtitle</key>
               <string>Apple</string>
               <!-- required. the title to display during the download. -->
               <key>title</key>
               <string>Example Corporate App</string>
           </dict>
       </dict>
   </array>
</dict>
</plist>
 
3)      Create a download link and place it in a web page that your users can access from their iOS device. You can either create a brand new web page, use an existing one, and embed the following link in it:

<a href="itms-services://?action=download-manifest&url=http://example.com/manifest.plist">Install App</a>

Notice this link points to the .plist file that you’ve created.

The following is a sample of a more robust and cosmetically appealing app download web page:
 
<!DOCTYPE html>
<html>
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <title> iOS App Installation</title>
        <style type="text/css">
                body {
                        background: url(bkg.png) repeat #c5ccd4;
                        font-family: Helvetica, arial, sans-serif;
                }
                .congrats {
                        font-size: 16pt;
                        padding: 6px;
                        text-align: center;
                }
                .step {
                        background: white;
                        border: 1px #ccc solid;
                        border-radius: 14px;
                        padding: 4px 10px;
                        margin: 10px 0;
                }
                .instructions {
                        font-size: 10pt;
                }
                .arrow {
                        font-size: 15pt;
                }
                table {
                        width: 100%;
                }
        </style>
</head>
<body>
 
<div class="congrats">Click the App Icon to Download</div>
 
<div class="step">
        <table><tr>
                <td class="instructions">Productivity App (iPad)</td>
                <td width="24" class="arrow">&rarr;</td>
                <td width="57" class="imagelink">
<a href="itms-services://?action=download-manifest&url=http://example.com/manifest.plist">Install App
                                <img src="app_icon.png" height="57" width="57" />
                         </a>
                </td>
        </tr></table>
</div>
 
</body>
</html>

 

4)      Host your files (make sure that your link/web page points to .plist file, and make sure your .plist file contains a fully qualified URL to your .ipa).

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk