I create an entire real* iOS image browser app with RubyMotion, RMQ, and Vim in 36 minutes

If your friends don’t understand what RubyMotion is, and you want to steal 36 minutes of their life, which they can never get back, send them this video.

* I’m looking at you PhoneGap


Happy New Year, Todd Werth (@twerth)

Articles, News, and Blog Posts


12/29/2013 – “An easy way to create animated side menus in RubyMotion” by Nick Pachulski

12/27/2013 –  “MotionInMotion Screencasts Launch –  The Best Way To Learn RubyMotion” by Jack Watson-Hamblin

12/26/2013 – “Video: Creating an Image Browser app in RubyMotion and RubyMotionQuery (RMQ)” by Todd Werth

12/24/2013 – “Learn RubyMotion Episode 10 – Show Spinner” by Neeraj Singh

12/24/2013 – “Write asserts in RubyMotion.” by Maethee

12/23/2013 – “ObjC people begin RubyMotion should know minimum” by Yuki SHIDA

12/21/2013 – “Easily create command line utilities for OSX with Rubymotion” by Mark Villacampa

12/20/2013 – “Building an ESPN App Using RubyMotion, ProMotion, and TDD” by Jamon Holmgren

12/20/2013 – “Rubymotion: Controlling Info.plist generation with environment variables” by Chris Bartling

12/20/2013 – “UITableView Hiding Under Scroll Bar in iOS 7” by Jamon Holmgren

12/19/2013 – “I try to use the UnderOS” by Sim

12/19/2013 – “Announcing Building Mac OS X apps with RubyMotion book” by Elliott Draper

12/18/2013 – “For implementation of the In App Purchase in RubyMotion” by Ainame

12/17/2013 – “Moria – Auto Layout in RubyMotion.” by Francis Chong

12/17/2013 – “IBeacon in RubyMotion” by Mackato

12/17/2013 – “Learn RubyMotion Episode 9 – Send Email From Help Screen” by Neeraj Singh

12/16/2013 – “RubyMotion Getting Started in RubyMine” by Makoto Kawasaki

12/16/2013 – “Learn RubyMotion Episode 8 – Reset Password by Invoking API” by Neeraj Singh

12/14/2013 – “Core Data Query – Streamlined Core Data for RubyMotion” by Ken Miller

In case you missed it

10/4/2013 – “Building a Command Line OS X app with RubyMotion” by Chendo

RubyMotion News


RubyMotion 2.18 Released

  • Added the `rake crashlog:device’ task which will download crash reports generated by the app on the device, symbolicate them and save them on the local file system. The latest generated file will then be automatically opened in Console.app.
  • Improved the terminal output when using `vendor_project` with an Xcode project so that it matches the build system output. This feature is using the XCPretty project. Thanks a lot to Marin Usalj and Delisa Mason for it.
  • [iOS] Fixed a bug where applications could not be launched on the simulator when using Xcode 5.1. Due to this change, Xcode 4 is no longer supported.
  • [OSX] Fixed a bug where apps generated on i5/i7 machines would fail to run on older machines (ex. core2) due to the use of a new instruction.
  • Fixed a bug where Hash#{[]=, clear, removeObjectForKey} will immediately release an object.
  • Fixed a bug where Array#{delete, clear} will immediately release an object.
  • Fixed a bug where Struct#[]= and setter of Struct member will immediately release an object.
  • Fixed a bug where setter of Boxed member will immediately release an object.
  • Fixed a bug where Kernel#instance_variable_set will immediately release an object.
  • Fixed a bug in the cycle detector where weak Proc objects would have their `self’ reference scanned, resulting in a double-release crash at runtime.
  • Fixed a bug where Kernel#block_given? would not work as expected if a Proc object was passed as a method argument.
  • Fixed a bug in the spec runner app that could cause the test suite to be started multiple times. Thanks to Jason W. May for the patch (pull request #145).
  • Improved Range.new performance. 20% faster.
  • Improved Array#flatten performance. 70% faster.
  • Improved Time#strftime performance. ~30% faster.
  • Improved Numeric#{div, to_int} performance. 20-60% faster.
  • Improved Fixnum#== and Float#== performance when it would compare an object.  2.5-3 times faster.
  • Improved Enumerable#grep performance. 2 times faster.
  • Improved the build system to compile as many spec files in parallel as possible.

sudo motion update

RubyMotion Tip


Just because the code is in Objective-C, doesn’t mean you can’t monkey-patch it. The lawyers are making me say you shouldn’t monkey-patch as it’s evil, oh and this bag of peanuts *may* have peanuts in it.

Here is an example, I wanted to add additional_query_parameters to NSRails:

class NSRConfig
attr_accessor :additional_query_parameters
end

class NSRRequest
alias :old_http_request :HTTPRequest
def HTTPRequest
if additional_params = self.config.additional_query_parameters
self.queryParameters = {} unless self.queryParameters
self.queryParameters.merge!(additional_params)
end
old_http_request
end
end

So never monkey-patch, but when you do it works pretty well no matter where the original code is.

RubyMotion App of the Week


Updated Nov 07, 2013 – Jimdo
“With Jimdo’s app for iPhone and iPad, you can easily create a new website or update and edit an existing site on the go. More than 8 million websites have already been created with Jimdo’s do-it-yourself website builder.”

RMQ Tip


What is RubyMotionQuery (RMQ) you ask? Check out  this site

Align and Distribute

Grab a set of views, align them all left then distribute them vertically:
rmq(UIButton).move(left: 40, top: 100).distribute(:vertical, margin: 10)

One more thing