Q: How can I tell which version of the system my application is running under? In particular, how can I tell whether my application is running under Release 2 or 3?
A: This can be useful to know, for example, you have a Release 2-compiled application that would like to conditionally take advantage of Release 3 features, or you have some bug-workaround code necessary for Release 2 that you don't want executed when your application runs under Release 3.
You can do this through various means--for a specific piece of functionality, you might want to directly ask the object in question. For example, you could use objc_getClass() to determine if the NXHelpPanel class exists, or you could query an NXImage to see if it responds to imagePasteboardTypes: before trying to access its Release 3 functionality.
To get the version number of the Application Kit as a whole, you can ask the Application class for its version. For Release 3.0, it was incremented to two, previously, it was one.
QA848
Valid for 1.0, 2.0, 3.0