• 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: What to use instead of operatingSystemVersionString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What to use instead of operatingSystemVersionString


  • Subject: Re: What to use instead of operatingSystemVersionString
  • From: Sean McBride <email@hidden>
  • Date: Fri, 24 Feb 2012 11:55:02 -0500
  • Organization: Rogue Research Inc.

On Fri, 24 Feb 2012 13:56:08 +0700, Gerriet M. Denkmann said:

>The documentation says of NSProcessInfo operatingSystemVersionString:
>"This string is not appropriate for parsing". But if fails to mention
>what to use instead.
>
>So what should I use? Gestalt? Or is there some more convenient Cocoa
>alternative?
>
>(I need this info for a bug workaround which occurs only in 10.6.)

Depending on what your needs/purpose is, as Stephane says, NSAppKitVersionNumber may be your best choice.  Weak linking and doesRespondToSelector: are also useful.  If you use Gestalt, you should do this:

	SInt32 major = 0;
	(void)Gestalt (gestaltSystemVersionMajor, &major);

	SInt32 minor = 0;
	(void)Gestalt (gestaltSystemVersionMinor, &minor);

	SInt32 fix = 0;
	(void)Gestalt (gestaltSystemVersionBugFix, &fix);

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >What to use instead of operatingSystemVersionString (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Semi-Transient NSPopover disappearing when it shouldn't (10.7.3)
  • Next by Date: Re: [Obj-C] if (self) vs. if (self != nil)
  • Previous by thread: Re: What to use instead of operatingSystemVersionString
  • Next by thread: [Obj-C] if (self) vs. if (self != nil)
  • Index(es):
    • Date
    • Thread