Install an IPA on iOS directly from a URL

Back from vacations in Québec (lovely country & people), it’s time for a quick blog post for sharing a good trick!

On iOS when you want to share a build with others, you mostly use a third party service (like TestFlight), or you provide the IPA and they have to install it via iTunes or even better iFunbox. Unlike Android (with an APK file), on iOS we’re not able to install an app directly from its binary (IPA). Unless you point your URL to a plist file!

Upload your IPA on a FTP. Then create a plist file with this format:

<?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://davikingcode.com/MyGame.ipa</string>
                    <!-- it could also work with a TestFlight build inside the PUBLIC folder -->
                    <!-- <string>https://dl.dropboxusercontent.com/u/id/MyGame.ipa</string> -->
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.davikingcode.MyGame</string>
                <key>bundle-version</key>
                <string>1.0</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>MyGame</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

Don’t forget to change the url, app id and title name. Then create a simple HTML page:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">	
	<head>
		<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
		<title>Install MyGame</title>
		<style>
			html, body { height:100%; }
			body { margin:0;font-family:"Arial";font-size:40px; }
		</style>
	</head>
 
	<body>
 
		<br/> 
 
		<div style="text-align:center;">
			<h3>Install MyGame</h3>
		</div>
 
		<div style="text-align:center;">
			<img src="icon_57.png" border="0" align="center"></img>
		</div>
		<br/>
 
 
		<div style="text-align:center;">
			<a href="itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/an-id/MyGame.plist">Install MyGame</a>
		</div>
		<br/>
 
	</body>
</html>

Note you must have your plist file on a https server, Dropbox is the quickest way. You get it itms-services is the key.

And then, why not adding a QR Code to that page thanks to Google Chart Tools?

<div>
	<center>
		<img src="http://chart.apis.google.com/chart?cht=qr&amp;chs=400x400&amp;chl=<? echo rawurlencode("http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].$_SERVER['QUERY_STRING']) ;?>" />
	</center>
</div>

Thanks Sébastien for the trick!

2 thoughts on “Install an IPA on iOS directly from a URL

Leave a Reply

Your email address will not be published. Required fields are marked *