Installing certificates (.cer) in iOS devices

For a developer, installing  different certificates in iOS devices is a common work flow step.
There are many ways to do it but, here is one that I consider to be the easiest.

High level steps:

  1. Creation of an ad-hoc wifi network
  2. Running a simple web server
  3. Browse the directory in iDevice
  4. Installing the certificates

Detailed steps:

1. Creation of an ad-hoc wifi network

The ad-hoc network creation in my mac machine did not help me.  If it does not work for you, go ahead and create a hotspot and connect your iMac and iDevice to that wifi.

2. Running a simple web server

  • Open terminal in your mac.
  • Go the directory where you have the certs to be installed
  • Run the below command.
python -m SimpleHTTPServer
  • Open your the browser in your mac and try the below address
http://localhost:8000/

You should Ideally see something similar to the screen below:

localhost

Make a note of the IP address of your mac.

3.Browse the directory in iDevice

Open safari in the iDevice and enter the below url and tap go.
http://xx:xx:xx:xx:8000/
If everything works well, you should see something similar to this:

devicescreen
Now, select the certs that you want to install and follow the prompts thrown by iOS.

Enjoy!

Installing certificates (.cer) in iOS devices