• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to get the Mac OS X version?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get the Mac OS X version?


  • Subject: Re: How to get the Mac OS X version?
  • From: Andreas Monitzer <email@hidden>
  • Date: Sat, 8 Sep 2001 13:59:00 +0200

On Saturday, September 8, 2001, at 01:32 , Finlay Dobbie wrote:

NSDictionary *systemVersion = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.
plist"];

You can then use the keys ProductBuildVersion and ProductVersion to return the build number (e.g. 4Q12) and other version number (e.g. 10.0.4)
. I personally do this:

if (![[systemVersion objectForKey:@"ProductVersion"] isEqualToString:
@"10.0.4"]) {
int retVal = NSRunAlertPanel(@"Incompatible system?",@"You do not appear to be running Mac OS X 10.0.4. This product has only been tested on Mac OS X 10.0.4.\n\nIf you are using a version prior to 10.0.4, this product will probably work, but you should update to 10.0.4 anyway.\n\nIf you are using a version of Mac OS X later than 10.0.4, then please check back to the web site at http://osx.hotlinex.org/ for an updated version.",@"Continue anyway",@"Quit",nil);
if (retVal != NSAlertDefaultReturn)
[NSApp terminate:self];
}

You didn't prepare your app for localization! Even when you don't localize it yourself, somebody else might want to do it.

andy
--
Description forthcoming.


  • Follow-Ups:
    • Re: How to get the Mac OS X version?
      • From: Finlay Dobbie <email@hidden>
References: 
 >Re: How to get the Mac OS X version? (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Re: How to get the Mac OS X version?
  • Next by Date: Re: How to get the Mac OS X version?
  • Previous by thread: Re: How to get the Mac OS X version?
  • Next by thread: Re: How to get the Mac OS X version?
  • Index(es):
    • Date
    • Thread