@peternlewis I suppose “sw_vers -productVersion” is a little better than parsing SystemVersion.plist but too bad about Gestalt.
-
-
- View other replies
-
@mjtsai is sw_vers output really any better or more reliable than parsing the plist? - View other replies
-
@peternlewis@mjtsai I'm going with sysctl(3). Just sayin'... - View other replies
-
@rbrockerhoff@mjtsai how does sysctl help? It will tell you the kernel release, which you can map (existing numbers) to a system release. -
@peternlewis@mjtsai so, you just compute the system version from the kernel release version, right? -
@rbrockerhoff@mjtsai yes, you can do that (for existing versions, not for future versions). So you can say "I require 10.8" using that. -
@peternlewis@mjtsai given that the current mapping works from 10.1 to 10.8, it should work for 10.9+. Not sure what they'll do on 11.x :-)
-
-
-
@peternlewis check for features, not OS version - View other replies
-
@skid Checking for features is sometimes problematic. Classes are sometimes exported before they are public, for example. /cc@peternlewis -
@jimcorreia@skid Also, sometimes we need to check not for features but for bugs that are known to occur in particular versions. - View other replies
-
@mjtsai@jimcorreia@peternlewis agreed. I asked around and recommendation is to keep using Gestalt until a future OS replaces it (10465563) -
@skid@mjtsai@jimcorreia according to a stackoverflow post, Apple developers at WWDC 2012 recommended the plist.http://stackoverflow.com/questions/11072804/mac-os-x-10-8-replacement-for-gestalt-for-testing-os-version-at-runtime … -
@peternlewis@mjtsai@jimcorreia given the widespread use of SystemVersion.plist, it's not likely to go away, and is what Gestalt still uses
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Michael Tsai
Rainer Brockerhoff
Ammon Skidmore
Jim Correia