Chapter 1
Creating a New App

It’s time to dive into RubyMotion. We will go over what we need to install, how to create a project, and how to run and debug our apps. That might sound like a lot, but I promise you’ll be surprised at just how fast we can get something up and running. Since we plan on moving fast, this book assumes you’re familiar with Ruby; we won’t be doing anything too tricky with the language, but you should be comfortable with the common syntax for things like blocks and instance variables.

RubyMotion 2 is a commercial product from HipByte and can be purchased from the RubyMotion website (http://rubymotion.com/). The RubyMotion tools work only on OS X 10.7 or newer, so make sure your operating system is up to date. When you purchase a license for RubyMotion, you will receive a key and a graphical installer, which will take care of everything.[3] You also need to download Xcode, Apple’s IDE, from the Mac App Store. Installing Xcode also installs some developer tools RubyMotion relies on (such as the iOS Simulator), but you don’t have to work on RubyMotion projects using it or any other IDE.

Instead, RubyMotion uses command-line tools, and you can use any text editor you want. There are add-ons for many popular editors that help with things like code completion and build integration.[4] RubyMotion also builds on top of existing Ruby tools such as RubyGems and Rake, so Ruby developers will feel right at home.

Once everything is installed, you’re ready to take the dive. Read on!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset