Forum Xamarin.iOS

How to get the current MAC OSX version programmatically?

PreranaPrerana INMember ✭✭

Hello All,

I need to determine the current version of Mac OSX my application is running on.

Searching on net I read about Gestalt system call which is in CoreServices, but I could not find this method in MonoMac.
(Note: Many suggested not to use Gestalt anymore as it is deprecated from Mac OSX 10.8)

What is the exact way to do it??

Thanks in Advance!!

Best Answer


  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    Have you tried System.Environment? There are OSVersion and Version static members that should give you what you need (maybe - don't have access to check this myself at the moment).

  • PreranaPrerana INMember ✭✭


    I explored the System.Environment 's OSVersion and Version variables

          Console.WriteLine (System.Environment.OSVersion);

    Returns me



          Console.WriteLine (System.Environment.Version);

    Returns me


    @robertmiles3 way is apt to the point.

    Thanks for answering..:)

  • PreranaPrerana INMember ✭✭


    This was exactly what I was looking for!!..I had actually gone till


    which was giving me

        <NSProcessInfo: 0x4087000>

    Little should I have cared to see that it has a property too ...:P

    Nevertheless, Thanks a ton for the answer it resolved my issue..:):)

Sign In or Register to comment.