tags:

views:

74

answers:

2

I need to get the 'nice' Mac OS X version string (e.g., "10.5.8"). Other sources say to use the "gestalt" to reliably get this value. The problem is, the Gestalt is a Carbon API and I can't link to Carbon (its a long story). Is there some other way, perhaps a direct Cocoa method?

+1  A: 

You can run sw_vers in an NSTask and sort through its output.

Azeem.Butt
+1  A: 

How about

[[NSProcessInfo processInfo] operatingSystemVersionString]
newacct