I am using below code to check OS X version at runtime.
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_10) { /* On a 10.10.x or earlier s
Starting with Yosemite, you can use [NSProcessInfo processInfo].operatingSystemVersion and test the result in the struct NSOperatingSystemVersion.
[NSProcessInfo processInfo].operatingSystemVersion
NSOperatingSystemVersion