Tuesday, July 21, 2020 [Tweets] [Favorites]

Big Sur Is Both 10.16 and 11.0

Howard Oakley (Hacker News):

For apps built with Xcode, the version returned depends on which version of its SDK they were built with. SDK 10.15 and earlier will consistently respond that Big Sur is major version 10 and minor version 16. This ensures that all existing apps should see Big Sur as simply an incremented minor version, as we had expected before WWDC this year.

Build an app with a new release of Xcode which features the macOS 11 SDK, and the major version will be 11 and the minor version 0.

Update (2020-08-19): Howard Oakley:

One method commonly used to look up the macOS version number is to obtain the string value for the ProductVersion key in /System/Library/CoreServices/SystemVersion.plist. However, depending on the environment of the caller, Big Sur plays tricks with that file, which should return a version of 11.0. If the caller has set SYSTEM_VERSION_COMPAT=1, then the version number returned isn’t obtained from that property list at all, but its companion SystemVersionCompat.plist, which is 10.16.

He says that reading the contents of that file actually returns different results depending on the value of the environment variable. That’s wild. So, if you clone your drive using a backup app that hasn’t been recompiled, the SystemVersion.plist in the backup will have the wrong version number.

Update (2020-09-11): See also: Armin Briegel.


Update (2021-05-03): Alexandre Colucci:

When using the 10.15 SDK, macOS Big Sur reports itself as 10.16.0 even when parsing the file /System/Library/CoreServices/SystemVersion.plist. Turns out that Apple checks for this specific path in the open() function in xnu 🤯


I just saw “OS Version: Mac OS X 10.16” in a submitted crash report as well - not sure if there will be inconsistency in that field.

What I actually see is quite interesting… If you build a binary with SDK 11.0 (using Xcode 12 or otherwise) and leave the default deployment target (macOS 11.0):

1. If you build an arm64 binary, LC_BUILD_VERSION is reported as:
sdk 11.0
minos 11.0
2. If you build a x86_64 binary, LC_BUILD_VERSION is reported as:
sdk 11.0
minos 10.16
3. If you build a universal binary, LC_BUILD_VERSION is reported as:
sdk 11.0
minos 11.0

If you then thin that universal binary to both arm64 and x86_64 parts, those respective parts will report the same info as separately built ones, minos=11.0 for thinned arm64 binary and minos=10.16 for thinned x86_64 binary.

Thus, the deployment target OS is reported differently for arm64 and x86_64 binaries.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment