Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out iOS version

Is it possible to read the iOS version (4.2.1, 4.3.3, etc.) running a MonoTouch app? If so, how?

like image 244
riha Avatar asked May 23 '11 10:05

riha


People also ask

What is latest version of iOS?

The latest version of iOS and iPadOS is 15.6.1. Learn how to update the software on your iPhone, iPad, or iPod touch. The latest version of macOS is 12.5.1. Learn how to update the software on your Mac and how to allow important background updates.

How do I tell what version of iOS is on my Mac?

Which macOS version is installed? From the Apple menu  in the corner of your screen, choose About This Mac. You should see the macOS name, such as macOS Monterey or macOS Big Sur, followed by its version number. If you need to know the build number as well, click the version number to see it.


3 Answers

Try UIDevice.CurrentDevice.SystemVersion.

like image 147
Anton Avatar answered Oct 04 '22 17:10

Anton


If you only need it for a boolean condition, there is a convenience method:

if (UIDevice.CurrentDevice.CheckSystemVersion (6, 0)) // at least 6.0
like image 28
Dan Abramov Avatar answered Oct 04 '22 17:10

Dan Abramov


In MonoTouch:

To get the Major version use:

UIDevice.CurrentDevice.SystemVersion.Split('.')[0]

For minor version use:

UIDevice.CurrentDevice.SystemVersion.Split('.')[1]
like image 36
callisto Avatar answered Oct 04 '22 18:10

callisto