Well, my questions is really simple i guess.
I use NSFoundationVersionNumber to check the version of my app , and make it both compatible with iOS6 and iOS7 .
if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1 ){
//Here goes the code for iOS 7
}
else if (NSFoundationVersionNumber == NSFoundationVersionNumber_iOS_6_1){
//Here goes the code for iOS 6.1
}
Well,as far as i know, Apple has released 6.1.X versions.So, using the second "else-if" statement, versions 6.1.X are excluded from the list of compatible versions i make?If yes is the answer, then how can i determine ,if the device is running on 6.1.X versions?
Thank you very much :)
When NSFoundationVersionNumber == NSFoundationVersionNumber_iOS_6_1
is true, then the device has 6.1.X.
When NSFoundationVersionNumber == NSFoundationVersionNumber_iOS_6_0
is true, the device has 6.0.X.
When NSFoundationVersionNumber < NSFoundationVersionNumber_iOS_6_0
is true, the device has 5.1.X and below.
When NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1
is true, the device has 7.0 and above.
apple forgot to provide NSFoundationVersionNumber constants for iOS 7, 10.8 and 10.9, but you can get the numbers by NSLogging out your NSFoundationVersionNumer (which gives you the NSFoundationVersionNumber of your current OS)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With