• 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: Checking OS Version with Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking OS Version with Cocoa


  • Subject: Re: Checking OS Version with Cocoa
  • From: Jim Correia <email@hidden>
  • Date: Sat, 4 Jan 2003 17:12:16 -0500

On Saturday, January 4, 2003, at 04:56 PM, Chad Armstrong wrote:

Is there a way to check a machine's OS version using Cocoa? I've searched through some books, the web, and even these archives and didn't find anything right off hand. I've seen some Carbon code in doing this, but not Cocoa.

Is there a reason why you can't just use the "Carbon" code?

SInt32 GetSystemVersion()
{
static SInt32 gSystemVersion;

if (gSystemVersion == 0)
{
if (noErr != Gestalt(gestaltSystemVersion, &gSystemVersion))
gSystemVersion = 0;
}

return gSystemVersion;
}

It will return 0x1023 for 10.2.3.

Jim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Checking OS Version with Cocoa
      • From: Bill Cheeseman <email@hidden>
References: 
 >Checking OS Version with Cocoa (From: Chad Armstrong <email@hidden>)

  • Prev by Date: Getting a float from an NSNumberFormatter
  • Next by Date: Re: Checking OS Version with Cocoa
  • Previous by thread: Checking OS Version with Cocoa
  • Next by thread: Re: Checking OS Version with Cocoa
  • Index(es):
    • Date
    • Thread