How can I find the version number of Mac OS X (eg. "10.6.7") from my Cocoa Objective-C application?
#import <CoreServices/CoreServices.h>
SInt32 major, minor, bugfix;
Gestalt(gestaltSystemVersionMajor, &major);
Gestalt(gestaltSystemVersionMinor, &minor);
Gestalt(gestaltSystemVersionBugFix, &bugfix);
NSString *systemVersion = [NSString stringWithFormat:@"%d.%d.%d",
major, minor, bugfix];