Getting started with PhoneGap/Cordova with iOS,Your first Helloworld iphone app using PhoneGap/Cordova on iOS

Install homebrew if already not installed:
  1. ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Install nodejs npm utility:
  1. brew install nodejs
Install cordova:
  1. npm install -g cordova
Create a hello world project:
  1. cordova create hello com.example.hello HelloWorld
cd into project root dir where config.xml is located:
  1. cd hello
Add ios platform specific libraries.Run:
  1. cordova platform add ios
Check add platforms by running:
  1. cordova platforms ls

You should see something like this:
Installed platforms: ios 3.5.0
Available platforms: amazon-fireos, blackberry10, firefoxos, ubuntu

Install iphone emulator:
  1. npm install -g ios-sim
Build helloworld project:
  1. cordova build

Run helloworld app:
  1. cordova emulate ios

You should see something like this:


No comments:

Post a Comment