Is Tahoe really macOS 26 or 16?

14 hours ago 1

Although there was no ambiguity in Apple’s announcement that later this year it will be releasing macOS 26 Tahoe, together with version 26 of its other operating systems, there have been claims that this might just be a ‘marketing version’ and not really the case. There is some evidence that could be misinterpreted as confirming that, where some of Apple’s developer web pages refer to macOS 16.

But others choose to differ.

Cast your mind back five years to macOS 11 Big Sur, when what had been expected to be macOS 10.16 but was announced as 11.0 instead. That had the potential to upset a lot of code and scripts that had become used to checking the minor but not major version number. Apple foresaw those problems, and devised an ingenious scheme that allowed Big Sur to be simultaneously both 10.16 and 11.0. It’s hardly surprising that has been implemented once again for Tahoe.

Rules

There are two fundamental rules provided by Apple:

  • In compiled languages, the version returned by macOS depends on the SDK which the software has been built against. When built against the 15 SDK or earlier, Tahoe returns 16 for compatibility with previous numbering and all existing apps; when built against the 26.0 SDK, it returns 26.0 for forward compatibility.
  • In scripted languages run within a shell environment, there’s an environmental variable to control the version number given. Set SYSTEM_VERSION_COMPAT=1 and Tahoe returns 16; leave that variable unset, or SYSTEM_VERSION_COMPAT=0, and it returns 26.

AppleScript

Move a script across to Tahoe, and it will be compiled in the 26 environment, so
system version of (system info)
returns 26.0, as will that code inside an AppleScript app built on Tahoe.

Scripts and other languages

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, Tahoe plays tricks with that file, which should return a version of 26.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 16.0.

You can test this at the command line, by entering the two commands
SYSTEM_VERSION_COMPAT=1 cat /System/Library/CoreServices/SystemVersion.plist
and
SYSTEM_VERSION_COMPAT=0 cat /System/Library/CoreServices/SystemVersion.plist

Which is it – 16 or 26?

macOS Tahoe is very definitely, and not just for marketing purposes, macOS 26, but depending on how you ask that question, it could pretend to be 16 if you wish.

Read Entire Article