Generating/signing iOS development keys on linux with PhoneGap Build

I'm a linux user. I have no intention or desire to run OSX. But I still am an iOS user and dabble on building some native mobile web apps. What's a guy to do? Phonegab Build to the rescue.

Phonegap Build allows you to develop on any platform that you want and easily upload a zip archive of the website to build, and once you have imported your iOS signing keys it take care of building your application for you. It's pretty fucking awesome that they've built this. I'm a fan.

Here are the instructions on how, as a linux user, to generate your own private keys, get them signed by Apple, export them to the phonegap required format, and upload them.

NOTE: This is entirely based off of the excellent instructions from this blog, adapted for Linux, with some screenshots and more detail added around signing/mobile provisioning which were not clear to me before:

Generate your keys and get them signed by apple

Generate your private key to be used for signin

You should should choose (and remember) your passphrase

openssl genrsa -des3 -out ios.key 2048

Generate the CSR (e.g. the Cert Signing Request) that will be sent to apple
COMPANY=shuff inc
openssl req -new -key ios.key -out ios.csr -subj "/emailAddress=${EMAIL}, CN=${COMPANY}, C=${COUNTRY}"

This dumps out ios.csr

Go to the Apple Developer website and get your csr signed

Choose iOS Apps

Click "Development" under Certificates

choose mobileprovision file

Click the plus button

choose mobileprovision file

Choose iOS App Development. Click Continue.

choose mobileprovision file

Upload the ios.csr file generated in the last step

Apple then signs your key, and generates a cert for you to use

Download it. As of writing it downloads as:


Generate your p12 file

Convert your cert to a PEM.

openssl x509 -in ios_development.cer -inform DER -out ios_development.pem -outform PEM

Create the p12 file required by phonegap build containing your private key and the ios cert

openssl pkcs12 -export -inkey ios.key -in ios_development.pem -out ios_development.p12

Make sure to remember your passphrase!

Upload this to phonegap build where it says .p12

choose p12 file

Generate your Mobile Provisioning Profile

Add your device to your ios account so you can download apps to it

Get the UDID.  Go here and install the profile to make it happen:

Or you can get it with itunes.

Create/download a provisioning profile after adding your new device

Add your new mobileprovision profile to phonegap build

choose mobileprovision file


;Enjoy building some web apps on Linux and deploying them to your iOS device :)