atlas by clearpeople

Distributing iOS Enterprise Apps built with Xamarin

22 October 2017
  

The enterprise distribution program of Apple (In-House) is a fantastic way to create business mobile applications and distribute it based on business needs (on demand). However, the documentation about how to distribute the app through this method is scarce, especially if you've created it with Xamarin instead of Xcode.

 

Previously, the easiest (yet tedious) way of distributing your iOS enterprise app (on demand) was to install it on devices through iTunes, however since iTunes 12 the app installation section has been removed, it is complicating the distribution process enormously.

 

In this post, we are going to explain how to distribute your iOS enterprise app created with Xamarin Forms or Xamarin iOS (if you have created it with Xcode it can also be useful but some steps may be different) uploading your app into a secure website. Therefore your users can download your application from their iOS devices without the help of a technician, in a similar way as you would from the Apple Store.

 

Before starting: This guide assumes that you have successfully generated the IPA file of your enterprise application, if not, check this guide first.

 

So let's start!

 

Step 0 - Understanding what we are going to do

If you are thinking about uploading your IPA to somewhere and download it with a link I have a bad news for you: "it doesn't work". The iOS devices don't recognize the .IPA files as app installers because of an .IPA file is technically a "compressed file". Therefore, we need a manifest that tells our device that we want to install an application. In a nutshell, you are going to download a manifest and then this manifest is going to install the app through the .IPA file.

 

Manifest to download and install the app through the IPA file

Step 1 - Uploading your IPA file to the correct place

This step is really easy, you only need to upload your app to a Website or file hosting and copy the link to download it, but you have to take into account the following things when choosing where to upload it:

  • The website must be secure (use a Https protocol)
  • The link must be accessible to the user
  • The link must specify that it is an .IPA file so you mustn't hide the extension.Example of a valid link: https://www.mywebsites.com/myApp.ipa

Step 2 - Creating and uploading your installation manifest

First things first, we are going to explain how to create manually an installation manifest (projects created with Xcode have a tool to create it automatically). An installation manifest is a .plist file that contains information about your app:

  • The URL of the .IPA file. Example: https://www.mywebsites.com/myApp.ipa
  • The Bundle-identifier of your app. Example: com.yourcompany.nameapp
  • The version of your app. Example: 1.0
  • The Title of your app. Example: My Enterprise App
    Feel free to copy this template and replace its content but don't forget the .plist extension:

<?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>https://www.mywebsites.com/myApp.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.yourcompany.nameapp</string>
<key>bundle-version</key>
<string>1.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>My Enterprise App</string>
</dict>
</dict>
</array>
</dict>
</plist>

 

Now you can upload your manifest to a website or file hosting fulfilling the same requirements as with the .IPA file and copy the link.

 

Step 3 - Distributing the app link

You have the link for your manifest but the final link to download and install the app must contain a special format/action for iOS devices to know what they have to do with that manifest, so you must add this before your manifest link, to obtain the final app link:

 

itms-services:///?action=download-manifest&url=

Resulting in something like this:

itms-services:///?action=download-manifest&url=https://www.mywebsites.com/manifest.plist

It's time to get the link of your application to your users. You can create a web page with a button to download the app or maybe you would like to send the link by email. In any case, you must be aware that the link must be opened directly from Safari on the iOS device the user wants to install it on.

 

Once the application has been installed, your users will have to enable "trust in your company" from their devices. If you have doubts about how they should do this take a look at this link.

Author bio

Jorge Garcia

Jorge Garcia

I develop websites with Sitecore and mobile apps for iOS, Android and Universal Windows Platform with Xamarin. I love developing apps and investigating exciting new ways to engage users. When I'm not in front of the computer, you'll find me practicing magic tricks or reading a great book.

View all articles by this author View all articles by this author

Get our latest posts in your inbox