Those defines are found in Availability.h
, located within whatever SDK you are using. For example, you can find a version for the 3.0 simulator at
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/include/Availability.h
As a note, it's easy to look up constants like __IPHONE_3_0
by highlighting them, right-clicking, and selecting "Jump To Definition" from the pop-up menu.
In Availability.h
, the header itself describes in detail how to selectively compile for various versions. For example, to compile code only if the iPhone OS version is greater than 3.0, you could use
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_3_0
// Your code here
#endif
Note that this is for determining what to include at compile time, not for selectively enabling code based on what version of the OS the application is running on.