Archive for March, 2010

Video: AspectObjectiveC In Five Minutes

Saturday, March 20th, 2010

Here’s a quick video about AspectObjectiveC, and what it can do. The code is available from github. I should also mention that AspectObjectiveC isn’t ready for release just yet.

Side Project: AspectObjectiveC

Thursday, March 11th, 2010

I’ve started a new side project called AspectObjectiveC on github. It’s a little aspect-oriented programming framework for objective-c.

In a nutshell, it allows you to run arbitrary code before, after, or instead of any method at runtime. You can modify arguments before they enter the method, modify the return value of the method, or completely replace the method’s implementation without touching the class’ source code. This includes classes that you don’t have the source code for (e.g. other frameworks). It’s released under the MIT license, even though it doesn’t mention it anywhere yet.

It’s still rough, but it’s working (on my machine :) ). If you want to try it out then build the framework target and whack it into an app as a private framework. It’s got no documentation yet, but the public headers only expose one protocol (AOCAdvice) and one class (AOCAspectManager) with two methods, so it’s pretty intuitive. You can check the unit tests for example usage too.

If you want to contribute code, that’d be great. If you want to test it out on platforms other than OSX >= 10.5, i386 with gcc, that would also be great. Feel free to shoot me an email about it.