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.

DeliciousTwitterFacebookRedditLinkedInEmail

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

©2012 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.


Leave a Reply

Your email address will not be published. Required fields are marked *