Ruby + iOS = Super awesome!

Are you fed up with Objective-C? Now, you can build iOS apps with Ruby (mruby)!.


MobiRuby takes advantage of mruby, which is a minimalistic implementation of Ruby. It is a relatively new endeavour by the Ruby founder, matz. Watch the keynote. mruby was released on April, 20th, 2012.


MobiRuby aims to replace Objective-C/C/Java on mobile platforms with Ruby, just like you can use Lua or Mono to build apps on those platforms. Now, we have mruby thanks to Matz!

Now, we are working on iOS and Objective-C. We will port MobiRuby to Android at next step.

Open source

Currently, It's released alpha version on

MobiRuby is available under the MIT License.

Go to repository »

Hello world on MobiRuby

Currently, You need call Cocoa functions throught Ruby code for making MobiRuby app. We're focusing to build Cocoa bridge now.

In next step, We'll create natual Ruby library for making iOS application.

# UIAlertView demo
class Cocoa::MyAlertView < Cocoa::UIAlertView
    define C::Void, :didPresentAlertView, Cocoa::Object do
        p "MyAlertView::didPresentAlertView"

    define C::Void, :alertView, Cocoa::Object, :clickedButtonAtIndex, C::Int do |me, index|
        if index.to_i == 1
            app = Cocoa::UIApplication._sharedApplication
            url = Cocoa::NSURL._URLWithString("")
            app._openURL url

alert = Cocoa::MyAlertView._alloc._initWithTitle "Hello",
  :message, "I am MobiRuby",
  :delegate, nil,
  :cancelButtonTitle, "I know!",
  :otherButtonTitles, "What's?", nil
alert._setDelegate alert

In the real world

AppStore already accepted MobiRuby based apps.


RubyConf 2012

Slides and script

mruby & MobiRuby intro

Who is bulding MobiRuby?