Documentation for SYSTEM_VERSION_COMPAT

Is there some official documentation about the SYSTEM_VERSION_COMPAT environment variable and how it affects the version reported by tools like sw_vers and whether the presence of that environment variable affects APIs like NSOperatingSystemVersion?

I ask this in context of recent macOS 26 Beta version where NSOperatingSystemVersion from older versions of XCode (for example XCode 15.4) report the macOS version as 16.0.

As of macOS 26 beta 3 NSOperatingSystemVersion seems to report the major version as 26, even for apps built against the macOS 15 SDK.

Hello @torarnv, you are right - with XCode 15.4, I just tried:

NSOperatingSystemVersion osVer = [[NSProcessInfo processInfo] operatingSystemVersion];

on a macos 26 Beta 4 system and it returned:

majorVersion=26 minorVersion=0 patchVersion=0

This wasn't the case in a previous Beta version of macos 26. So it looks like this got addressed in a recent Beta release. I hope this is an intentional change/fix from Apple (and not accidental) so that we can rely on this change in the upcoming 26 release.

Documentation for SYSTEM_VERSION_COMPAT
 
 
Q