Re: operatingSystemVersionString replacement
Re: operatingSystemVersionString replacement
- Subject: Re: operatingSystemVersionString replacement
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Fri, 25 Oct 2013 11:21:35 +0700
On 25 Oct 2013, at 10:53, Maxthon Chan <email@hidden> wrote:
> You can use uname(3) (on sone other system it is listed as uname(2)) - that is the most classic UNIX way of telling a system from another.
This returns:
sysname = "Darwin"
machine = "x86_64"
release = "13.0.0"
version = "Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64"
Maybe there is something which gives me "10.9" or "10.8.5" or anything more Mac-like?
>
> On Oct 25, 2013, at 11:49, 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.
>>
_______________________________________________
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