What most users know is that Phonegap (renamed Cordova) was restructured in version 2.0 to remove the installation DMG file from the download package. Instead, iOS users are now instructed to install PhoneGap through the terminal. While everything has been streamlined with a few installation scripts provided by the developers, it is different, and sometimes hard to tell if you installed everything correctly until you compile the application. Here are a few of the symptoms that I’ve seen from people who mess up the installation:
- libCordova.a is displayed in red when building the project
- argv6 errors at compile time
- Everything works in the Simulator, but does not build on an actual device
- CordovaLib.xcodeproj not found issues
Download and open the Phonegap 2.1 package from the official site. Open a terminal window, and cd to the installation directory, which is most likely ~\Desktop\phonegap-2.1\. Now run the following scripts:
As shown in the screenshot above, you need to first create a new project:
./create [project_folder_path] [package_name] [project_name]
Then you need to set the path to your libraries.
./update_cordova_subproject [xcodeproj file]
Now open up your project and set the deployment target to 4.3.