Here's a quick tip for if you want to have an iPhone application that targets both an earlier version of the iPhone OS and the new iPhone OS 3.0. Juse use the __IPHONE_3_0 precompiler define to compile specific code for iPhone 3.0. i.e.
#ifdef __IPHONE_3_0
// iPhone 3.0 specific stuff
#else
// iPhone 2.2 specific stuff
#endif