Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source Ruby For iOS Implementation That Actually Works (Alpha)

  •  
  •  
  •  
  •  
  •  

I’ve mentioned RubyMotion in the past – a commercial solution that allows you to develop iOS apps using the Ruby programming language.

Today I received a tip about an open source solution for developing apps using Ruby on the iOS platform based on MRuby (a lightweight Ruby implementation) which was announced earlier this year by Ruby founder Matz.

Here’s a keynote featuring Matz explaining some of the details of MRuby:

Here’s a code snippet from the homepage displaying MobiRuby’s syntax:

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

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("http://mobiruby.org")
app._openURL url
end
end
end

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

You can find MobiRuby by Yuchiro Masui on its homepage here.

MobiRuby is still in alpha, but it definitely looks like it’s off to a great start.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments