• 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: operatingSystemVersionString replacement
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: operatingSystemVersionString replacement


  • Subject: Re: operatingSystemVersionString replacement
  • From: "Gary L. Wade" <email@hidden>
  • Date: Fri, 25 Oct 2013 06:02:23 -0700
  • Thread-topic: operatingSystemVersionString replacement

Not to say using the OS version number is right in your case, but when I
need a parseable OS version number without relying upon Gestalt, I get the
ProductVersion key from /System/Library/CoreServices/SystemVersion.plist
and parse that into an NSIndexPath, which works great with encapsulating
10.8.5, 10.9, 10.7.5.12, etc.

If there's a need for knowing the build version and doing a similar
comparison (not to say this applies for you), you could parse the number,
letter, and number from the key ProductBuildVersion into corresponding
values and store those in another NSIndexPath.
--
Gary L. Wade
http://www.garywade.com/


On 10/24/2013 8:49 PM, "Gerriet M. Denkmann" <email@hidden> wrote:

>The documentation tells me that NSProcessInfo
>operatingSystemVersionString "is human readable, localized, and is
>appropriate for displaying to the user. This string is not appropriate
>for parsing."
>
>Ok. So what do I use for parsing?
>
>like: if ( current_os_x_version < 10.9 ) then do something...
>
>Once there was Gestalt, but this is deprecated since 10.8.
>
>Gerriet.


_______________________________________________

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


  • Follow-Ups:
    • Re: operatingSystemVersionString replacement
      • From: Sean McBride <email@hidden>
References: 
 >operatingSystemVersionString replacement (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: NSPopupButton and content values binding transformer
  • Next by Date: Re: operatingSystemVersionString replacement
  • Previous by thread: Re: operatingSystemVersionString replacement
  • Next by thread: Re: operatingSystemVersionString replacement
  • Index(es):
    • Date
    • Thread