iOS 8 Deprecated quite a few things- for instance if you did a map search using the Xamarin MapDemo, it uses a UISearchDisplayController but that’s now deprecated and you are meant to start using UISearchController instead.

Knowing which version of iOS your App is running on then becomes important. While I can use the older UISearchDisplayController on iOS 8, I can’t use the newer UISearchController on iOS 7.

Now I’ve been previously using this property to check if the OS is a certain version.

        public bool IsiOS8
        {
            get { return UIDevice.CurrentDevice.CheckSystemVersion(8, 0); }
        }

But I think it’s better to check if a version is >= 7 and for that purposes the MonoTouch.Foundation class provides NSProcessInfo() with it’s OperatingSystemVersion and Major and Minor properties. Note I’ve also changed IsiOS8 from a property to a function.

        public static bool IsiOS8()
{
return (new NSProcessInfo().OperatingSystemVersion.Major >= 8);
}

Leave a Reply

Post Navigation