Ios ota distribution

From John Freier
Jump to: navigation, search

This is to document the process to create OTA (over the air) deployments for ios.

This will allow an iOS device to connect to a website and directly download an application. presumable the newest build, but could be done for multiply builds as well.


File you will need.

1. application.ipa 2. image.512x512.png 3. image.57x57.png 4. manifest.plist 5. test.html


1. application.ipa

This is the actual appliation that will get installled on the device. The name of the file is not as important. Althogh a good note is that the name should not contain any spaces, this will cause problems.

2. image.512x512.png

This is the imaget that it will use when install, not sure why it is needed, but it is required. This image also does not need to be 512x512, I tested by using an image the was 114x114. Also I dont think the name is required to match this, as lons as it matches the name in the manifest.plist.

3. image.57x57.png

This is the icon is uses when trying to install the application. This is required but the name does not need to be this, only needs to match in the manifest.plist.

4. manifest.plist

This file contains all the nessecary information for the applicaiton to be installed, there are 4 main parts,

a. URL - The URL where the file is located to download from. b. display-image - The icon to display when downloading. c. full-size-image - The large image used by iTunes??? d. metadata - Informaiton about the applicaion.

5. test.html

This is the file that needs to contain the crazy link to the manifest.plist to download the application. This URL is not a normal URL.

 <a href="itms-services://?action=download-manifest&url=https:/blah.com/ios/manifest.plist">Download</a>


Apache Setup

There needs to be an additionaly type added to the apache http.conf, to correctly download the *.ipa to the device.

 AddType application/octet-stream .ipa

Tips

  • Make sure all links in the manifest are accessable.
  • Make sure the HTTP connection is HTTPs or this will not work! It is required by Apple as of iOS 7.1
  • Make sure Apache is setup to for the *.ipa type.


Example Code

This is a working example of a manifest with the URL x'd out.

 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
    <key>items</key>
    <array>
        <dict>
            <key>assets</key>
            <array>
                <dict>
                    <key>kind</key>
                    <string>software-package</string>
                    <key>url</key>
                    <string>https:/blah.com/ios/application.ipa</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>display-image</string>
                    <key>needs-shine</key>
                    <true/>
                    <key>url</key>
                    <string>https:/blah.com/ios/image.57x57.png</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>full-size-image</string>
                    <key>needs-shine</key>
                    <true/>
                    <key>url</key>
                    <string>https:/blah.com/ios/image.512x512.png</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.application</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>Mobile App</string>
              </dict>
          </dict>
      </array>
   </dict>
 </plist>


This is an example test.html file.

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
   <title>OTA Test App</title>
 </head>
 <body>
  • <a href="itms-services://?action=download-manifest&url=https:/blah.com/ios/manifest.plist"> Tap Here to Install the Application</a>
 </body>
 </html>


Resources