SystemStats::getOperatingSystemType assertion fails on macOS 11.1

Apple just released macOS 11.1 (which should hopefully fix all the problems on my M1), and this breaks an implicit assumption by juce::SystemStats::getOperatingSystemType - which the update was expected to be a 11.0.X (Apple stayed on version 10 for two decades, are they going to jump version every year now?).

Everyone is likely to hit this assertion as the constructor of juce::TopLevelWindow happens to call it.

Suggested fix at,

Note how it also renames juce::SystemStats::MacOSX_11_0 to juce::SystemStats::MacOSX_11 to reflect this naming scheme shift by Apple.


In case such renaming is considered generally, shouldn’t it be named MacOS_11 (without the X) then to really reflect the naming of the operating system? :wink:


True! Possibly too late for the macOS 10 constants because old user code may have them, but certainly for the new one!

Thanks for raising this, I’ve fixed the assertion and updated the naming:


MacOS = 0x0100,
MacOSX = MacOS, // deprecated

though officially its macOS, so might be better if new names reflect this too?

macOS = 0x0100,
MacOSX = macOS, // deprecated

macOS_11 = macOS | 16,

btw: 11.1 is now released.
I guess we will see a few new releases in relatively quick succession)

(I didnt think the MACOSX_10 was that bad, given X=10 :wink: )