17

In native iOS I know how to get device iOS version. But now I want to achieve in Xamarin.iOS. So,

how can I get the iOS version of device using Xamarin.iOS?

Stephane Delcroix
  • 16,134
  • 5
  • 57
  • 85
user3124624
  • 1,206
  • 1
  • 12
  • 18

2 Answers2

46

I am able to get the iOS device version using

UIDevice.CurrentDevice.CheckSystemVersion(7, 0)

The above method returns the BOOL value true, if the device version is above (or equal to) iOS 7. Otherwise it returns false.

poupou
  • 43,413
  • 6
  • 77
  • 174
user3124624
  • 1,206
  • 1
  • 12
  • 18
3

Even if this is too late but it might helps somebody else. You can get the iOS version, running on your device, in your Xamarin.iOS project(in AppDelegate.cs) this way:

string targetOS = UIDevice.CurrentDevice.SystemVersion;

Debug.WriteLine("iOS version: ", targetOS); // =In my case=> iOS version: 12.4.4

Xamarin.Forms version 4.3.0