Quantcast
Channel: July 2020 – Michael Tsai
Viewing all articles
Browse latest Browse all 69

Big Sur Is Both 10.16 and 11.0

$
0
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.

Previously:

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 🤯


Viewing all articles
Browse latest Browse all 69

Trending Articles