Azure, iOS and enterprise deployment


If you want to deploy an iOS application provisioned under an enterprise license on an IIS box the steps are simple enough:

– Create a folder where the .ipa file will be stored such as \inetpub\wwwroot\myApp
– Create a manifest (.plist) file, here is an example of what that should look like


<?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.yourdomain.com/myApp/myApp.ipa</string>
       </dict>
      </array>
    <key>metadata</key>
     <dict>
      <key>bundle-identifier</key>
      <string>com.yourdomain.myApp</string>
      <key>bundle-version</key>
      <string>1.12.08.1200</string>
      <key>kind</key>
      <string>software</string>
      <key>title</key>
      <string>myApp</string>
     </dict>
    </dict>
  </array>
</dict>
</plist>

– Next step would be to create a link in your web page that points to the manifest file you just created, notice it is a special type of scheme:

...
<a href="itms-services://?action=download-manifest&url=http://www.yourdomain.com/myApp/myApp.plist"> Tap Here to Install myApp</a>
...

Now if you tried to click on the link at this stage you would start receiving errors. So the next thing to do is add a couple of extensions into your MIME types

.ipa – application/octet-stream
.plist – text/xml

Done, you can now browse to the page on your iPhone/iPad/iPod and install your newly provisioned enterprise application.

WHAT ABOUT AZURE? I did mention Azure in the title of the post, so what’s different if you want to deploy via a Azure Website?

Technically, nothing is different, you still need the manifest file, and you still need to set up the href. The caveat here is that you cannot edit MIME Types in your Azure admin area.

Thankfully it is not a difficult thing to overcome. You can add your MIME Type directly to the web.config file

...
<system.webServer>
    <staticContent>
      <mimeMap fileExtension=".ipa" mimeType="application/octet-stream" /> 
      <mimeMap fileExtension=".plist" mimeType="text/xml" /> 
    </staticContent>   
</system.webServer>  
...

Now your enterprise application can be distributed using the power of Azure Websites 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: