Yu-Chieh’s Blog (Y.C. Chang)

Ruby on Rails / Rubygems / FullStack / Git / Mac notes.

How to Install Ionic and Its Dependencies

  • install node js by Homebrew
1
2
3
4
$ brew doctor
$ brew update
$ brew install node
$ brew install ant
  • install cordova and ionic by npm
1
2
$ npm install -g cordova ionic
$ npm install -g ios-sim
  • install XCode and Android
  • for android sdk we need to go to SDK Website and download standalone sdk tools only file

  • next, unpack it and run for install required resources

1
$ android-sdk-macosx/tools/android sdk
  • finally, create a android virtual device by avd tool
1
$ android-sdk-macosx/tools/android avd
  • Genymotion is recommanded as android emulator (faster than avd) and do not forget to install virtualbox before installing Genymotion.

  • you might also want to change avd location

1
ln -s path/to/my/avd ~/.android/avd
  • then, let’s get start with ionic by sample app
1
2
3
4
5
6
7
8
$ ionic start todo blank
$ ionic platform add ios
$ ionic platform add android
$ ionic build ios
$ ionic build android
$ ionic emulate ios
$ ionic emulate android # for avd
$ ionic run android # for Genymotion

Comments