Setup Apache Cordova in OSX Yosemite for Android & iOS apps

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.

  1. Install ant using brew
    sudo brew update
    sudo brew install ant
    
  2. Check ant version:
    ant -version
  3. Install Cordova using npm
    sudo npm install -g cordova
    
  4. if you plan to compile cordova app for android, set ANDROID_HOME to point to Android SDK
    export ANDROID_HOME=~/android/sdk/
  5. 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]