osx - Why is `NSAppKitVersionNumber10_10` not included in `NSApplication.h` for OS X 10.10 Yosemite? -


it has been common advice use nsappkitversionnumber check new features provided cocoa frameworks @ runtime:

https://developer.apple.com/library/mac/releasenotes/appkit/rn-appkit/

one typical use of floor() value, , check against values provided in nsapplication.h. instance:

if (floor(nsappkitversionnumber) <= nsappkitversionnumber10_8) {   /* on 10.8.x or earlier system */ } else if (floor(nsappkitversionnumber) <= nsappkitversionnumber10_9) {   /* on 10.9 - 10.9.x system */ } else {   /* 10.10 or later system */ } 

in os x 10.10 , xcode 6.2, nsapplication.h includes:

/* version of appkit framework */ appkit_extern const double nsappkitversionnumber;  #define nsappkitversionnumber10_0 577 #define nsappkitversionnumber10_1 620 #define nsappkitversionnumber10_2 663 #define nsappkitversionnumber10_2_3 663.6 #define nsappkitversionnumber10_3 743 #define nsappkitversionnumber10_3_2 743.14 #define nsappkitversionnumber10_3_3 743.2 #define nsappkitversionnumber10_3_5 743.24 #define nsappkitversionnumber10_3_7 743.33 #define nsappkitversionnumber10_3_9 743.36 #define nsappkitversionnumber10_4 824 #define nsappkitversionnumber10_4_1 824.1 #define nsappkitversionnumber10_4_3 824.23 #define nsappkitversionnumber10_4_4 824.33 #define nsappkitversionnumber10_4_7 824.41 #define nsappkitversionnumber10_5 949 #define nsappkitversionnumber10_5_2 949.27 #define nsappkitversionnumber10_5_3 949.33 #define nsappkitversionnumber10_6 1038 #define nsappkitversionnumber10_7 1138 #define nsappkitversionnumber10_7_2 1138.23 #define nsappkitversionnumber10_7_3 1138.32 #define nsappkitversionnumber10_7_4 1138.47 #define nsappkitversionnumber10_8 1187 #define nsappkitversionnumber10_9 1265 

notably missing nsappkitversionnumber10_10 os x 10.10 yosemite.

has 10_10 version been excluded, , reason?

do these constants typically show in version after current?

or method of checking version numbers outdated? if so, replacement?

do these constants typically show in version after current?

yes. similarly, 10.9 sdk defines through nsappkitversionnumber10_8.

you'll notice code snippet quoted doesn't include explicit check 10.10. it's implicit fallback after of other checks.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -