In iOS 4.3, there are 3 rather low level functions in the runtime that provide a new kind of bridge between Objective-C and Blocks with a specific goal of facilitating the dynamic generation of method implementations. Specifically:
IMP imp_implementationWithBlock(void *block); void *imp_getBlock(IMP anImp); BOOL imp_removeBlock(IMP anImp);
Okay, this is officially awesome. I hadn’t realised (or, thinking about it, I think I only forgot) that these were available in iOS 4.3. I discovered them in the Lion headers, and was planning on providing two-stage handling for 10.6/iOS4 vs. 10.7/iOSn in my awesome new open-source project. Now I can give 10.6 the finger and do it how I wanted to in the first place, woo!