This post shows you how to distribute your Monotouch Application over the network via email, or via a url link. Before you even attempt this, you should make sure you have an Enterprise developer account with Apple, and valid provisioning profiles assigned to your application. I wont discuss how to do all of that – you can find several resources on those topics.

Step 1.
In your project options, choose Ad-Hoc Configuration then select IPA Options and place a checkbox next to Build ad-hoc/enterprise package (IPA).

Step 2.
Under iPhone Bundle Signing, make sure you select the correct Enterprise Distribution Profile.

Step 3.
Build the application, using the Ad-Hoc|iPhone Build Configuration, then go to the bin folder where you will see the yourappname.ipa file.

Step 4.
Copy the ipa file to you web server.

Step 5.
Add the following MIME Types on your web server:
– .ipa application/octet-stream
– .plist text/xml

Step 6.
Create a text file called yourappname.plist file on the same folder as your yourappname.ipa file in your web server and type the following xml:

<?xml version="1.0" encoding="UTF-8"?>
<!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>http://www.yourserver.com/yourappname.ipa</string>
				</dict>
			</array>
			<key>metadata</key>
			<dict>
				<key>bundle-identifier</key>
				<string>com.namespace.com.yourappname</string>
				<key>bundle-version</key>
				<string>1.0</string>
				<key>kind</key>
				<string>software</string>
				<key>title</key>
				<string>Your App Title</string>
			</dict>
		</dict>
	</array>
</dict>
</plist>

Step 7.
Create an install.html file and insert the following html:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style type="text/css">
	p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier; color: #120000; background-color: #f9f9f9}
</style>
</head>
<body>
<a href="itms-services://?action=download-manifest&url=http://www.yourwebserver.com/yourappname.plist">Tap Here to Install the Application</a>
</body>
</html>

Step 8.
Navigate to that webpage from your iPhone or iPad, and click the link. The user will be asked to confirm the install. If everything is in order, the application will be installed.

The important item is the actual href link that is clicked:

href="itms-services://?action=download-manifest&url=http://www.yourwebserver.com/yourappname.plist

“itms-services”, when executed from an iOS device triggers a process in iOS to download the ipa and install the application over the air.  This is the magical element that makes this all work.

You can place that link on any website, or even in an email and as long as it is clicked by an iOS device, the application will install.