Reliable was to get current OS Version in MAC.

Oct 18, 2011
Reaction score
Hi All,

I am working on Snow Leopard and work for a product based company. In one of our company's product, in the About box I need to display the current MAC OS Version.

Wanted to know if using the "SystemVersion.plist" method to determine the OS Name and version is the most reliable method available?

NSString *versionString;
	NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
	versionString = [sv objectForKey:@"ProductVersion"];

I want to avoid making use of technique where major,minor versions are used to determine the current OS version as this method requires often requires formatting hardcoded strings to generate OS Version.

The above-mentioned code will give us the current OS Version as a string which can be displayed as it is.

Can I safely use this approach for current and future version of MAC (Lion and higher version of MAC which might be released in near future)?

Shop Amazon

Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.