0

Cani check the version of app for ios 9 like this or is there any other way?

if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_8_0) {
//ios 9 or below?
} else {
//ios 9 above
}
dicle
  • 1,122
  • 1
  • 12
  • 40

1 Answers1

2

You can check the version like that:

 [[UIDevice currentDevice].systemVersion floatValue];
Gal Marom
  • 8,499
  • 1
  • 17
  • 19
  • Yes this will give you the os version, but to check the NSFoundation number is a better way. if you want to now whether you can call a method or class you check whether the calls name is null or the object response tp selector. Check the iOS version is not the correct way. – rckoenes Nov 03 '15 at 15:04
  • It depends on your purpose, you are right. Deniz question is " is there any other way?" so I've just provided one. Cheers – Gal Marom Nov 03 '15 at 15:17