user3124624
user3124624

Reputation: 1216

How to identify the iOS version in Xamarin.iOS

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?

Upvotes: 17

Views: 12844

Answers (2)

Mohamed Aloui
Mohamed Aloui

Reputation: 133

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

Upvotes: 4

user3124624
user3124624

Reputation: 1216

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.

Upvotes: 47

Related Questions