1

One of the open source software I'm contributing to has recently started using features that are only available on OS X 10.7 and later. We'd like to detect at startup time (or preferably before the program is even started, if some DMG metadata allows for that) if a user is using an older version of OS X and display a message telling him to upgrade his OS (or use an older version of our software).

What is the best way to do this? I'm not an OS X developer so please keep it as simple as possible :)

Pierre Bourdon
  • 10,521
  • 4
  • 33
  • 27

1 Answers1

1

You can do it using methods in the C std library. This question explains how Getting the OS version in Mac OS X using standard C

As mentioned in the comments this was deprecated in 10.8. This question explains a work around for the time being How do I determine the OS version at runtime in OS X or iOS (without using Gestalt)?

Community
  • 1
  • 1
evanmcdonnal
  • 46,131
  • 16
  • 104
  • 115
  • Gestalt has been deprecated starting from OS X 10.8 from what I read on the internet. It does not seem like the right way to go for new code. Any better way to do that? – Pierre Bourdon Mar 14 '13 at 20:51
  • @PierreBourdon there is a work around. I'm posting a link to another question which explains it. – evanmcdonnal Mar 14 '13 at 20:53