Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Building for iOS

nickygerritsen edited this page Nov 19, 2014 · 2 revisions

For the phonegap build, copy pgbuildconfig.example.json to pgbuildconfig and adjust your phonegap build credentials. You can create an account on phonegap build

For the iOS build to work, you need a certificate and provisioning profile. To do so:

  • Make sure you are a (paid) member of the iOS developer program
  • Go to https://developer.apple.com/account and log in with your credentials
  • If you do not have a distribution certificate yet, click on "Certificates" and then the "+". Afterwards, follow the instructions
  • Afterwards, click on "App IDs" in the left column
  • Click the "+" to add an app ID. You can also use the * wildcard
  • Click "All" under "Provisioning Profiles" and click the "+"
  • Select "Ad Hoc" distribution if you want to distribute the app ad hoc or "App Store" to distribute it to the Apple App Store
  • Follow the instructions by selecting the app ID, your certificate and, in case you request an add hoc profile, the devices for which this build will be for
  • Download the profile
  • Open "Keychain Access.app" on your Mac
  • Search for the private key belonging to your distribution certificate and right click it. Select export
  • Make sure the .p12 file format is selected and save the file somewhere
  • You need to have a passphrase, otherwise the Phonegap Build Service will not accept your file
  • Upload both this .p12 file and the provisioning profile you downloaded to Phonegap Build (at your accout, signing keys)
  • Don't forget you unlock your key with the passphrase you provided!
  • If all went OK, you can now link the key to your app and you should be good to go
  • Don't forget to uncomment the lines for iOS in Gruntfile.js

Finally, run grunt phonegap or grunt phonegap:ios

Clone this wiki locally