Posted tagged ‘iPhone’

Fixing iphone4r

March 12, 2008

There’s a very nice looking plugin for Rails to make it easier to develop iPhone versions of web sites and applications, called iphone4r. It is the work Nicholas Schlueter of Simpltry.com, and built on top of work done by (no surprise!) Joe Hewitt.

The only problem I’ve had with it so far is that it doesn’t work! Okay, the problem is quite small, and fairly easily fixed if you have even the slightest understanding of Rails plugins. Since the plugin fails to copy the iui directory to your /public directory, just add a line to install.rb to copy that over. When you’re done, install.rb should look like this:

require 'fileutils'
RAILS_ROOT = File.dirname(__FILE__) + "/../../../" unless defined? RAILS_ROOT
# Install hook code here
def copy_files(source_path, destination_path, directory)
  source, destination = File.join(directory, source_path), File.join(RAILS_ROOT, destination_path)
  FileUtils.mkdir(destination) unless File.exist?(destination)
  FileUtils.cp(Dir.glob(source+'/*'), destination)
end
directory = File.join(File.dirname(__FILE__), "copy_on_install")
copy_files("/script", "/script", directory)
FileUtils.chmod 0755, File.join(RAILS_ROOT, "script", "ibug"), :verbose => true
copy_files("/public/ibug", "/public/ibug", directory)
copy_files("/public/iui", "/public/iui", directory)

The Future of the iPhone, according to Jason Fried

March 7, 2008

No discussion of developing with Ruby on the iPhone would be complete without mentioning Jason Fried’s take on the future of development on the iPhone:

What we saw today was the spark. The explosion will continue for twenty years. We will all feel the warmth…. just like there were a lot of players in the portable music space, there were no clear leaders. Until Apple came to town.¶ The same thing is happening today in the mobile space. Palm, Windows Mobile, Blackberry, Symbian. They’ve been players, but no one has broken out big. No one has managed to grab both the business and consumer markets like Windows did on the desktop. Until Apple came to town. At least that’s my prediction.

RubyCocoa on iPhone

March 7, 2008

I’m currently downloading (‘as we speak’–it’s 2.1 GIG) the iPhone SDK, after recently playing around with developing toy apps last night in RubyCocoa.

The idea is irresistable (if not slightly implausible) that it just might be possible to build iPhone apps with RubyCocoa. A quick Google search suggests that others are asking the same question, but no one seems to have an answer. But something on Apple’s site suggests that this might be possible:

The applications you create with Ruby and Python are packaged exactly like native Mac OS X applications. Your end-users will not be able to tell the difference. What’s more, Apple is committed to binary compatibility between releases of Mac OS X. This means you will no longer need to embed the runtime and language interpreter in your application.

So they’re saying that (for non-iPhone RubyCocoa development, at least) you don’t *need* to embed the (RubyCocoa) runtime and language interpreter in your application. This implies that it is possible to embed the runtime for RubyCocoa, and if it’s possible to do on a Mac, why not on an iPhone?

Does anyone know any reason that this would or would not be possible?