Tuesday, March 10, 2015

ionic framework crash start!

AngularJS has been popular MVC framework for SPA. There are alternatives like EmberJS or similar but AngularJS really kicked of pretty well and was well adapted by the community. ReactJS is posing challenge to all framework in the rendering area. But keep all those aside, if you want to build iOS and inclined to build Hybrid app using PhoneGap and comfortable AngularJS, then ionic is natural choice. Without getting in to conversation if you want to build native app on iOS or not and WebUI performance issues, UX etc, I shall quickly jump in to quick start.

When I started developing front end apps, first thing I made sure to incorporate was yeoman. I could use community generators or I could create something for myself to standardized templates.

Install yeoman - straight forward

sudo npm install -g yo

Install grunt
sudo npm install -g grunt-cli

Install ionic-cli
sudo npm install -g ionic

Install yeoman generator for ionic
sudo npm install -g generator-ionic

Scaffold ionic app
yo ionic sample-app

Add ios target as platform so that you can build and launch simulator
grunt platform:add:ios

Add any custom plug-in you need
grunt plugin:add:

Prepare cordova
sudo npm install -g cordova

Install ios-sim runtime for grunt
sudo npm install -g ios-sim

Now launch the app
grunt emulate:ios