- Creating New Projects
- Building Hello World the Template Way
- Using the Simulator
- The Minimalist Hello World
- Converting Interface Builder Files to Their Objective-C Equivalents
- Using the Debugger
- Memory Management
- Recipe: Using Instruments to Detect Leaks
- Recipe: Using Instruments to Monitor Cached Object Allocations
- Analyzing Your Code
- Building for the iOS Device
- Detecting Simulator Builds with Compile-Time Checks
- Performing Runtime Compatibility Checks
- Pragma Marks
- Preparing for Distribution
- Over-the-Air Ad Hoc Distribution
- Submitting to the App Store
- Summary
Over-the-Air Ad Hoc Distribution
You can distribute ad hoc ipa files over the air by creating links to a simple webpage. The itms-services: URL scheme, when pointing to an application manifest property list allows your users to install apps wirelessly. You provide the ipa and the manifest on the website. Here’s how you might link to the manifest.
<a href="itms-services://?action=download-manifest& url=http://example.com/manifest.plist">Install App</a>
Make sure your website is configured to support the following two MIME types.
application/octet-stream ipa text/xml plist
Building a Manifest
The manifest is an XML-based property list. It must contain 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 PNG icon used during download and installation
- full-size-image—a fully-qualified URL pointing to a 512×512-pixel PNG (not JPEG!) image that represents the iTunes app
- bundle-identifier—the app’s standard application identifier string, as specified in the app’s Info.plist file
- bundle-version—the app’s current bundle version string, as specified in the app’s Info.plist file
- title—a human-readable application name
In addition to these required keys, you can specify an optional md5 hash for file elements. Listing 3-3 shows a sample manifest provided by Apple.
Listing 3-3. Apple Sample Manifest
<!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> <!-- optional. md5 every n bytes. --> <!-- will restart a chunk if md5 fails. --> <key>md5-size</key> <integer>10485760</integer> <!-- optional. array of md5 hashes --> <key>md5s</key> <array> <string>41fa64bb7a7cae5a46bfb45821ac8bba</string> <string>51fa64bb7a7cae5a46bfb45821ac8bba</string> </array> <!-- required. the URL of the file to download. --> <key>url</key> <string>http://www.example.com/apps/foo.ipa</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</string> </dict> <!-- full-size-image: the large 512×512 icon used by iTunes. --> <dict> <key>kind</key> <string>full-size-image</string> <!-- optional. one md5 hash for the entire file. --> <key>md5</key> <string>61fa64bb7a7cae5a46bfb45821ac8bba</string> <key>needs-shine</key> <true/> <key>url</key> <string>http://www.example.com/image.512×512.jpg</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>