2010

2009

2007

2006

2005

reMail now open source, uses MailCore on the iPhone

Entry published mar 08 2010

Exciting news from reMail! reMail has been acquired by Google and reMail is now open source!

This means that MailCore for iPhone is now available as part of the remail-iphone project. MailCore code has been compatible with the iPhone, but because Apple doesn’t allow iPhone apps to link against OpenSSL or CyrusSASL, using MailCore has been non-trivial. Gabor Cselle has done the hard work for us by including OpenSSL and CyrusSASL dependencies and providing his work under the Apache license.

My hope is that this will spur new IMAP/SMTP apps now that it’s easy to use MailCore on the iPhone. In the future I’d like to make this even easier by pulling in some of reMail’s MailCore changes, but for now check out remail-iphone

0 comments category: general programming
. o .

Announcing Rocketbox & Central Atomics

Entry published feb 10 2010

Stupid me… I just realized I never announced the launch of my new company here! I’ve been so busy shipping Rocketbox, sending out press releases and answering support e-mail, that I forgot about my lonely blog!

I’ve built a search add on to Mail.app I call Rocketbox.. It provides more powerful search with handy features like person auto completion. If you’re the kind of person that uses search a lot, make sure to check out Rocketbox!

Along with Rocketbox, I’ve setup a new company I call Central Atomics to house my new product. So go check out Central Atomics and Rocketbox

. o .

Nasty hacking with 64-bit Objective-C

Entry published sep 10 2009

If you’re loading code dynamically and using an unsupported API under Cocoa 64bit, you’ll be greeted with this unpleasant surprise:

9/7/09 2:34:06 PM   Mail[8641]  MailTest.mailbundle failed to load. The error was:
Error Domain=NSCocoaErrorDomain Code=3588 UserInfo=0x100563840 "The bundle “MailTest” couldn’t beloaded."

After many hours of slamming my head against the desk, and help from others (namely Erik Hinterbichler, I’ve figured out how to get around this error. Why would you want to do this in the first place? Well, it’s useful for creating addons to closed source products like Mail.app and Safari. The usual procedure involves dumping the headers for the app using class-dump, determining how to swizzle your code in, and finally figuring out how to load your code into the app.

With the switch to 64bit, Objective-C has a new dynamic loader that pays attention to symbol visibility. The 32bit loader didn’t, and would allow your code to bind to any symbol in the app. With the 64bit loader, only symbols that are explicitly exported are available for dynamic binding. As a result, nearly all the symbols in an app like Mail.app aren’t exported for binding. If you do try to bind, you’ll see that error message above.

So what’s the trick? Never reference any of the symbols directly! Instead you’re going to us NSClassFromString along with the Objective-C runtime methods available from the header <objc/runtime.h>

Here’s how I now set the super class for a Mail.app plugin:

+ (void) initialize {
    class_setSuperclass([self class], NSClassFromString(@"MVMailBundle"));
    [MattsMailBundle registerBundle];
}

Notice, this is done in the initialize class method, and no Mail.app symbols (in this case MVMailBundle) are referenced directly.

Hope that helps, happy hacking!

4 comments category: cocoa
. o .

→ 13 more things that don't make sense

Entry published sep 03 2009
. o .

→ Urinal protocol vulnerability

Entry published sep 02 2009
. o .

→ The bar for success in our industry is too low

Entry published sep 02 2009
. o .

Mini book review on Making of the Atomic Bomb

Entry published aug 31 2009

Posted it to my reading section. Take a look. Summary: If you’re into physics go buy it, it’s an excellent book.

1 comment category: general
. o .

→ The Wysiwym Markdown Editor

Entry published aug 31 2009