- Download and install NodeJS and PhoneGap
- Type this in Terminal: (make sure you have a stable internet connection because this will affect the generation of the code like missing libraries, invalid structures of directories etc.)
You have to do this project creating and building on command prompt because in later versions of XCode, they do not give you to choose Cordova application or PhoneGap application when you start a new project like shown in this picture:
- Find the .xcodeproj and run it (it will be opened automatically in XCode)
- And then Run the project (by pressing the button on the top left) and you will get this
You can modify the index.html or .js scripts and see how they look in simulator.An error usually occurs (the error message would be “index.html not found” when there is no index.html in www directory or the structure of the directory is not like shown below.
- The version I’m using is Xcode 5.0, iOS Simulator 6.1, PhoneGap 2.9.0 and node.js v0.10.20. Running on Mountain Lion 10.8.5
- If you are using different versions in either of one of them, the result might be slightly different