Skip to content
Jeremy Hewett edited this page Jun 23, 2014 · 21 revisions

Basic setup

  1. Install NodeJS
  1. Install Git
  2. Install Ionic
  1. Install the iOS SDK
  1. Clone this repository
  • >git clone https://github.com/jeremyhewett/HealthMeasures.git
  1. Add the iOS platform to the Ionic project
  • Navigate to the cloned repository in a command prompt.
  • >ionic platform add ios
  1. Build and run the project
  • >ionic build ios
  • >ionic emulate ios

Browser testing

Building the Ionic project and loading it in a device emulator takes time. For a quicker turn-around time during development, the app can be tested in Chrome.

  1. Install the Ripple add-on for Chrome
  1. Adjust Dependencies
  • Comment out <script src="cordova.js"></script> in index.html
  • Copy config.xml from the root of the project directory to /www/
  1. Run a web server
  • The easiest way to do this is to use the Ionic server by running >ionic serve which creates a server at http://localhost:8100. This server automatically refreshes the page when files are changed.
  1. Activate the Ripple emulator plugin in Chrome.

NOTE: Unfortunately it seems at this stage Ripple on supports up to Cordova 2.0.0

Troubleshooting

  • Uncaught Object error in Chrome
    • This is cause by long error strings not being displayed properly by Chrome. http://jsfiddle.net/jeremyhewett/8FE6a/
    • They are probably coming from ionic.bundle.js line 9070. Just add console.log(message) before that line to see the errors. (Remember this will also log caught errors which are not necessarily a problem.)

Building for Android in Windows

  1. Install Java SDK
  • JAVA_HOME=C:\Program Files\Java\jdk1.8.0_05
  1. Install Apache Ant
  • ANT_BIN=C:\Program Files\Apache\apache-ant-1.9.4\bin
  • Add ANT_BIN to path variable.
  • ANT_HOME=C:\Program Files\Apache\apache-ant-1.9.4
  1. Install Android SDK
  • ANDROID_HOME=C:\Program Files\Android\android-sdk
  • ANDROID_PLATFORM_TOOLS=C:\Program Files\Android\android-sdk\platform-tools
  • ANDROID_TOOLS=C:\Program Files\Android\android-sdk\tools
  • Add all 3 to path variable.
  1. Build project
  • >ionic platform add android
  • >ionic build android
Clone this wiki locally