Showing posts with label npm. Show all posts
Showing posts with label npm. Show all posts

Sunday, November 20, 2011

iOS App Development with PhoneGap and Spine Mobile: Setup

You need to setup your development environment. 


Since I'm targeting iOS I'm obviously using a Mac with OSX Lion and Xcode 4.2. You can find help with installing Xcode at developer.apple.com. Done? Good.



Here's a summary of the setup. The various web sites have more details.

Install Homebrew
If you're familiar with Linux's apt-get you'll love Homebrew. Simplifies installation and update of the Unix-y bits and bytes for OS X. Homebrew installs to the user's local space so sudo isn't required.

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

Install node.js via brew

$ brew install node

Install npm
For some reason, npm has been removed from brew. Use curl to download and install it.

$ curl http://npmjs.org/install.sh | sh
Install Spine, Spine.app, and Hem via npm


$ npm install -g spine spine.app hem


iOS App Development with PhoneGap and Spine Mobile: Introduction

A friend of mine recently asked me if I knew how to write iOS applications. She has an idea for an app (don't we all). Well, iOS development is something I've wanted to do since I picked up an iPod Touch a couple of years ago, I just haven't made the time to do it. 

I recently started learning Node.js and the Spine MVC framework for HTML5 web application development. The last website I worked on was several years ago (ASP.Net 1.1) and I want to try something that's not in the Microsoft stack. I've done PHP in the past but didn't really want to try it again. Javascript is hot and CoffeeScript has a lot of bleeding-edge attention right now. Maybe I can get ahead of the curve.

Spine also has a mobile framework that supports HTML5 web sites targeting mobile devices. I finally got a on of the simple demo apps working this week. Pretty darn easy once the sample app and the current Spine framework were in sync. 

Once I got that working I noticed a doc describing integration between Spine and PhoneGap. PhoneGap wraps your HTML5/JavaScript app into a mobile device native application with access to the device API. You can also deploy the application to multiple platforms. It's also open source. Sounds winning to me.

In future posts I will describe how to develop an iOS native application using PhoneGap, Spine Mobile, and CoffeeScript. Since the frameworks are constantly changing, I intend to keep an up to date working copy.