iOS auto configuration

Abdulkader Benchi
Linagora Engineering
2 min readFeb 3, 2017

During the last barcamp organized at Toulouse, we decided to auto-configure mobile devices using user’s configuration stored on OpenPaaS. By auto-configuration, we wanted to auto-configure Email, CalDAV and CardDAV server settings.

We organized two teams: one to work on iOS devices and the other on Android devices. I have decided to work with the iOS devices, cause I wanted to discover this ambiguous black-boxed ‘iOS’ word.

After digging a little bit in the iOS system, I discovered a built-in configuration utility called ‘configuration profile’. A configuration profile is a “.mobileconfig” XML file that allows to distribute configuration information. If you need to configure a large number of devices or to provide lots of custom email settings, network settings, or certificates to a large number of devices, configuration profiles are an easy way to do it.

Even though I am not a huge fan of iOS systems, I have to confess that profiles represent a great tool for all businesses starting out with an iOS strategy or business struggling to easily configure iOS devices for enterprise use. Using profiles, one can configure several settings containing email, passcode, VPN, Wi-Fi, CalDAV, CardDAV , and device restrictions. These settings can be easily applied to several iOS devices via a very simple HTTP ‘GET’ request so as to setup these devices directly.

What is under the hood?

We have started by creating a mustache XML template for the configuration profile from the server-side:

Our server, wait for a ‘GET’ http request to an exposed end point. The server get the username and password from the query part of the request.

The server get the user corresponding configuration and send back a configuration profile:

Finally, the client open the received answer by doing:

And let the magic happens:

Conclusion:

During this barcamp, I was really happy to discover the build-in support of configuration profiles in iOS. However, I did not liked the fact that we have to pay for a developer apple account so as to deploy our application to a real iOS device. To summarize, iOS is not so painful ;-)

--

--