I’m not sure which macros you were advised to use. I always thought that the standard way to find the version number, so that it was compatible with future and previous versions, was to use
NSString* versionNumber = [[UIDevice currentDevice] systemVersion]
which gives it as an NSString such as @ "2.0" or @ "2.2.1"
There are version constants that describe the version of Foundation classes used, with NSFoundationVersionNumber , but I'm not sure how reliable this will be in older and future code.
Brandon bodnar
source share