Setting Up the Project

Create our RubyMotion project with motion create Colr. To keep our project organized, add the following files and their directories:

  • ./app/controllers/search_controller.rb
  • ./app/controllers/color_controller.rb
  • ./app/models/color.rb
  • ./app/models/tag.rb

It already feels like a big fancy app, doesn’t it? Now we need to add BubbleWrap to our project. Earlier we used BubbleWrap to clean up key-value observing, but it also includes pleasant wrappers for HTTP requests. Refer to Changing Models with Key-Value Observing for detailed instructions, but essentially what we do is install the bubble-wrap gem and require it in our Rakefile.

Now that we have the pieces in place, it’s time to start writing some code.

Get RubyMotion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.