Cordova is super easy

From here on out, I’m referring to PhoneGap as Cordova, which I’m using to build my idea.

Firstly, ignore the documentation out there, which I’ve found either outdated or misleading… At least the setup for Cordova 2.2.0 and some of the development process deficiencies I blogged about before have already been addressed.

If you are using OS X, just follow these simple commands which installs Cordova, and creates project directories for ios and android, builds all, and launches both ios simulator and android vdm.

# Download the Android SDK 
# Unpack and place into ~/.devlib

# Install Node
brew install node
brew install ios-sim

# Install cordova
npm -g install cordova

# Set Path in .bash_profile
export PATH=${PATH}:~/.devlib/adt-bundle-mac-x86_64/sdk/platform-tools:~/.devlib/adt-bundle-mac-x86_64/sdk/tools
export PATH=${PATH}:/usr/local/share/npm/bin

# Create a project
cordova create <projectname> <projectname>
cd <projectname>
cordova platform add iOS android

# Check it in
git init .

# Build the package and run the simulators
cordova build
cordova emulate

Thanks to my dear brother, Dave, for setting me straight 🙂

From here, you can look at the Cordova API docs to install device features. I’ll blog more on how this is going for me.