Installing nodejs and npm:
If you have not install node and npm yet please go ahead and install it first. Here are some links to install:
- http://nodejs.org/
- http://shapeshed.com/setting-up-nodejs-and-npm-on-mac-osx/
- http://coolestguidesontheplanet.com/installing-node-js-osx-10-9-mavericks/
You can follow any of the above links to install node and npm.
Phonegap Installation using npm:
To install phonegap npm plugin use the below link:
Create a new app by typing:
cordova create new_app
This will create a folder new_app with the necessary folders. Replace the www folder contents with our app www folder contents which I will be sending through mail.
Note:
Before you proceed to adding platforms you have to install the iOS SDK which is used to generate the build. It is mentioned in the pre requisites in the above link. Proceed till "Create App" section. After this you wont be able to add platforms if iOS SDK is not setup.
Installing iOS SDK:
To proceed with iOS SDK here is a link provided by Phonegap themselves: http://docs.phonegap.com/en/2.9.0/guide_getting-started_ios_index.md.html#iOS%20Platform%20Guide.
Adding Platforms:
Once you are done with SDK installation proceed to add iOS platform by navigating to the app folder. For example if you have created cordova create new_app then cd new_app then add iOS platform by typing:
cordova add ios
Building the App:
Build the app using
cordova build ios
Running the App:
Open the app in xcode and run it in device.
http://docs.phonegap.com/en/2.9.0/guide_getting-started_ios_index.md.html#iOS%20Platform%20Guide