compiled and runs on the Objective-C Runtime RubyMotion is project created by Laurent Sansonetti, the original author of MacRuby Laurent was an Apple engineer, and left to release RubyMotion
cost of ~ $200USD gives you access to new versions as they are released MacRuby was open source, RubyMotion is not Although some parts of the toolchain have been released Apple Developer Programs - $99USD a pop p/a Community does release open source gems but there's a cultural difference
Apache Cordova have downsides: 'Uncanny valley' effect UI controls trying too hard to look native but missing the mark Less performant Reimplement APIs themselves Have a lag time when new APIs are introduced However - have the benefit of a relatively smaller learning curve
Named keyword arguments for Objective-C syntax Objective-C: [an_object function:with this:syntax] RubyMotion: an_object.function(with, this: syntax) (ala Ruby 2.0.0) Staticly compiled Ruby = Fast Ruby's object model on top of Cocoa Foundation classes and the Objective-C Runtime Can has all the APIs using Ruby syntax Managed memory - ARC-esque, and same performance App Store compliant
Objective-C to understand Apple's Docs. Cocoa development is as much understanding the frameworks and their APIs. Apple's documentation is the best place to do this.
each new project Console based workflow Use whatever editor you like rake build tasks REPL with magic powers (setting self) Preference of DSLs written in code over Interface Builder Pixate Formotion Teacup
camelCase versus snake_case Patterns that don't translate as well Design patterns built with language assumptions Implementing protocols Typing of objects Using complex types Different take on MVC to Rails 'ViewControllers' - presentational and interactivity Obj-C blocks are shorter and inline, whereas Ruby blocks can be long expressive configuration DSLs Verbosity
payload: data } ) do |response| if response.ok? json = BW::JSON.parse(response.body.to_str) p json['id'] elsif response.status_code.to_s =~ /40\d/ App.alert("Login failed") else App.alert(response.error_message) end end
install cocoapods $ pod setup Using a Podfile, with a Gemfile-like DSL: platform :ios, '7.0' pod 'JSONKit', '~> 1.4' pod 'Reachability', '~> 3.0.0' Not exclusive to RubyMotion - Objective C Devs use Cocoapods for importing Objective C libraries