Detailed Guide for setting up building iOS apps without a Mac

I am reposting this here mainly for my reference, but it should be helpful to anyone that is building apps with PhoneGap and needs to generate the required certificates to build their iOS app.

References….

http://community.phonegap.com/nitobi/topics/ios_build_without_mac

http://community.phonegap.com/nitobi/topics/detailed_guide_for_setting_up_building_ios_apps_without_a_mac

Download and Install OpenSSL

If you are performing this on Windows, download and install OpenSSL for Windows.  It is available from http://www.openssl.org/related/binaries.html. You most likely do not need to do this on Linux.  You may also use Cygwin, just be sure to install the OpenSSL packages.

For the remainder of this guide, it’s assumed you have installed OpenSSL into

C:\OpenSSL-Win32

which is the default location of the Windows binaries.

2. Create a working folder to hold all the certificate files and open a command prompt to that folder.

3. On the command prompt, enter the following to create a key file:

C:\OpenSSL-Win32\bin\openssl genrsa -out mykey.key 2048

4. On the command prompt, enter the following to create a Certificate Signing Request:

C:\OpenSSL-Win32\bin\openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj “/emailAddress=email@address.com, CN=Your Name, C=US”

Replace email address & name by your own and C=US by your country code if needed.

5. Upload the Certificate Signing Request to the Apple Developer Site on

http://developer.apple.com/ios/manage…

Refresh the page after a few moments and your CSR should be accepted.

6. Click the Download link listed next to your accepted certificate.

This will download the developer_identity.cer file. Store it in the folder you created earlier.

7. On the command prompt, enter the following to convert from .cer to .pem:

C:\OpenSSL-Win32\bin\openssl x509 -in developer_identity.cer -inform DER -out developer_identity.pem -outform PEM

8. On the command prompt, enter the following to create the .p12 file

C:\OpenSSL-Win32\bin\openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dist.p12

You will be asked to enter a password and confirm it. This password will need to be re-entered when submitting the .p12 file to PhoneGap Build.

9. On the Apple Developer Site, set up your devices, app id and provisioning:

https://developer.apple.com/ios/manag…
https://developer.apple.com/ios/manag…
https://developer.apple.com/ios/manag…

and download the provisioning file, store it in the folder created earlier

10. Upload both the provisioning and the .p12 files to PhoneGap Build:

https://build.phonegap.com/people/edi…

and provide the password you used before to build the .p12 file.

11. Set your config.xml widget id to the same value as your app id in the Apple developer site.

Note: the Apple app id format is something like

67AQJRV39J.com.okeez.connecttest

I set the widget ID to the entire value, but that seems to have broken my Android build (get error there now where before it built OK).

2 thoughts on “Detailed Guide for setting up building iOS apps without a Mac

  1. Pingback: Detailed Guide for setting up building iOS apps without a Mac | Jeff Karney - appgong

Leave a Reply

Your email address will not be published. Required fields are marked *