To use Apache Cordova on OSX Yosemite, the prerequisites are:
- brew
- npm
I assume both are available. In this quick blog, I will assume you’d like to compile, build and emulate your app for Android and iOs. Please remember that Cordova is also available for Window Phone 8, Firefox OS, … See Apache Cordova HomePage for details.
- Install ant using brew
sudo brew update sudo brew install ant
- Check ant version:
ant -version
- Install Cordova using npm
sudo npm install -g cordova
- if you plan to compile cordova app for android, set ANDROID_HOME to point to Android SDK
export ANDROID_HOME=~/android/sdk/
- If you plan to compile cordova app for iOS, install XCode from Apple Store
https://itunes.apple.com/en/app/xcode/id497799835
Then, you will need iOS Simulator from PhoneGap to test your app into iOS emulator:
sudo npm install -g ios-sim
To make a small test project on OSX, please read Apache Cordova Starting Guide.
[To be continued]