Using MacRuby for developing iPhone apps

5.7k views Asked by At

I'm looking to build an iPhone app, but I don't have enough time to learn Objective-C. I already know Ruby and discovered MacRuby. Is it possible to build an iPhone app using MacRuby alone, without any knowledge of Objective-C?

3

There are 3 answers

3
bbum On BEST ANSWER

This is a dupe of Can you use MacRuby to develop applications for the Mac App Store? (more or less).

Is it possible to build an iPhone app using MacRuby alone, without any knowledge of Objective-C?

In short, no.

All of the APIs (system frameworks), documentation, dev tools, examples, and the majority of the development community use Objective-C. You are going to have to know Objective-C through and through to be able to write an app against the iOS or Mac OS X system APIs anyway.

As well, the MacRuby runtime uses the Objective-C garbage collector that ships with Mac OS X. While porting that collector to iOS/ARM is likely not that hard (the source is available), the system frameworks don't support it; it won't work.

2
Ain Tohvri On

An answer to the question has been updated by RubyMotion:

RubyMotion is a revolutionary toolchain for iOS. It lets you quickly develop and test native iOS applications for iPhone or iPad, all using the awesome Ruby language you know and love.

0
Legion On

MacRuby is not yet ported to iOS.

An Apple engineer revealed on Twitter last September that work is being done to port MacRuby to iOS.

Until such a release sees the light of day, however, you will not be able to use MacRuby to write iOS apps.

Apple recently let it become known that MacRuby is to be included with the next release of OS X. It certainly looks like MacRuby may be on its way to becoming an Apple-blessed means of developing apps for OS X and iOS. One can only hope at this point, but these early indications are promising.