How to create a PhoneGap project for Xcode 4.5

Once you’ve downloaded the latest version from http://phonegap.com, unZIP it and copy the resulting folder to a safe directory (i.e. don’t leave it in your Downloads folder… duh!)

You’ll create a fully fledged Xcode project from the command line. Make sure you cd into the directory where the create script resides. Contrary to the “Getting Started with iOS” guide on the PhoneGap website, there is nothing that’s called “incubator”. Instead, navigate to the following directory:

cd phonegap-2.3.0/lib/ios/bin

Next issue the following command to create a new project:

./create /your-project-folder com.bundle.identifier Project-Title

After a few seconds the deed is done. You need to supply three parameters with the create script:

  1. your project folder (full path)
  2. your project’s Bundle Identifier in reverse-domain notation (i.e. com.versluis.myproject)
  3. and your project’s title

Once created you can open it in Xcode and run on both in the simulator and on a device.





Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at http://wpguru.co.uk and http://pinkstone.co.uk.