bookmark_borderRunning your own iPhone applications without paying the developer fee

For those of you wanting to build off-line, native applications for the iPhone / iPod Touch (with the 2.0 Software Update), you might have been disappointed to hear you need to shelve out $99 yearly for the privilege of being able to run your applications on a real iPhone.

Ok, $99 might not be a lot, but one also has to consider when you come to deploy your app for real, it might not pass through the rather stringent screening process to get it to the masses through the App Store.

Wouldn’t it be great if you could deploy any application you wanted for free?

Well thanks to the recently released pwnage tool, it’s now possible to run non-Apple-approved applications on your iPhone though “Jailbreaking”. I’ve spent quite a while trying to figure out how to get this working. Here’s what I have come up with so far.

First of all…

If you are not using a Mac, or you don’t have the iPhone SDK installed, or alternatively the “open toolkit”, then these instructions will be of no use to you.

If you haven’t done so yet, Jailbreak your iPhone / iPod touch via the “pwnage tool”. For reference, this is what I did:

  1. Download the pwnage tool
  2. Create and transfer Jailbroken firmware using the pwnage tool

After you’ve done all that, you’ll probably notice a new application called “Cydia” appears on your iPhone screen. This is basically the way end-users can access a wide range of free “homebrew” applications on their Jailbroken iPhone’s. If you want to deploy your application to end-users, you’ll have to get it into Cydia.

But enough about Cydia for now…

I’ve built applications, how on earth do I get them over to my iPhone?

If you are using XCode, make sure you set the SDK of your application to “Device – iPhone OS 2.0” (or the equivalent if it exists). Then all you need to do is click “Build and go”, and your application should appear on your iPhone.

Now you’ll probably get this rather “Unexpected error” popping up if you try and run your application with XCode.

Unfortunately while the pwnage tool allows you to run any application, that application still needs to be signed. So how do you sign it? Well, the best tutorial for that I have found is the ”Code Signing Guide” on Apple’s website.

You’ll need to make a self-signed certificate using the Keychain Access utility. Then you should run the following commands in a terminal on your built application:

export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform//Developer/usr/bin/codesign_allocate
codesign -fs “Name of your certificate here” /Path/to/your/built/

Unfortunately even when you do this, you still cannot run your app using XCode, so you can’t use any of those fancy debug tools with it. In order to run your application, you’ll have to copy it over yourself. You can either use OpenSSH (installed through Cydia), or [iphonedisk]( I used OpenSSH, as I had problems with the permissions not being preserved with iphonedisk:

scp -r /Path/to/your/built/ root@address_of_your_iphone_or_ipod:/Applications/
Re-load the springboard either by installing something with Cydia, or restarting your iPhone. And hey presto, your app appears!

Update: There is now a way to get your apps working directly from XCode. Simply follow the instructions here, and you should be able to debug your application straight from XCode. Neat!

Note: there are of course other ways to get your app working, but personally I found signing it to be the most obvious.

Right, now my application is ready for public consumption

Great! So how do we get it into Cydia? Well there are two options:

  1. Get the Cydia guy’s to host it in their repository
  2. Make your own repository

Well I couldn’t figure out how you are meant to contact the Cydia guy’s to get your application in their repository. Realistically speaking, this is the only way people are going to find your application, considering there is currently no user friendly way to add new repositories to Cydia.

After all, would you really want to type all of this into the terminal to add a single repository?

ssh root@address_of_your_iphone_or_ipod
echo "deb http://location.of/apt_repository/ ./" > /etc/apt/sources.list.d/apt_repository.list

To conclude

If you are really serious about making money off developing iPhone apps, then i’d cough up and pay the $99 developer fee. That way you’ll be able to target every iPhone / iPod Touch user, while being able to charge a fee for downloading.

If however you have an application Apple are never going to distribute (e.g. emulators), or you are just playing about and don’t mind the lack of XCode integration for on-device debugging, then developing for Jailbroken devices is for you. Personally though i’d recommend you compile your own “open toolkit”, as developing your own unofficial apps using the official SDK is legally questionable.

bookmark_borderRailsCollab Alpha 3

Hot off the presses, i’ve just pushed alpha 3 of RailsCollab to both Rubyforge and Github.

Railscollab? What’s that?

Railscollab is a re-write of the Project Management solution ActiveCollab (otherwise known as ProjectPier), which instead is written in Ruby and runs on the Ruby on Rails web development framework.

Why on earth would you want to do that?

Good question. Well, it all started when the developer of ActiveCollab announced they were ditching the open source version and going commercial and closed source. Of course, there were people like me that didn’t like that.

So I decided to make my own fork – however I added a twist. I decided to re-write it using Ruby on Rails, since the original PHP code was giving me a headache. Plus it seemed like a great way to get to know the Ruby on Rails framework.

Note that around the same time, another fork called ProjectPier arose, which opted to develop from the original PHP code.

So what’s new?

Quite a lot, actually. Pretty much everything that was present in ActiveCollab 0.7.x is now implemented, sans the the fancy web-based installer. I’ve also focussed a lot on fixing bugs and improving stability, as well as enhancing the time tracking components.

Time tracking with CSV export

… and of course there is the configuration editor which takes advantage of Phusion Passenger.

Configuration Editor

In addition, I have updated the RailsCollab demo, so if you don’t have the time to set everything up, you can still try out Alpha 3.

I’d also like to thank everyone (you know who you are) who has reported issues with RailsCollab over the past few months. Without your help, I doubt I would have had the willpower to make another release.

So what are you waiting for, try it out already. 🙂

Edit: If you are stuck wondering “How do I login?”, have no fear, the solution is here. You will need to use OpenID to login.

OpenID Logo

Simply select the “Use OpenID” checkbox and type in your OpenID to login. An account should automatically be created for you if one does not already exist, provided that your OpenID provider provides a username, email, and name.

You can get an OpenID from many places – one of my favourites being myOpenID.