Running ProcessingAudioInputTutorial fails with assertion

Running the tutorial project
https://docs.juce.com/tutorials/ZIPs/ProcessingAudioInputTutorial.zip
from
https://docs.juce.com/master/tutorial_processing_audio_input.html
fails in Xcode with assertion in juce_mac_SystemStats.mm line 136:

jassert (parts[0].getIntValue() == 10);

Looks like it assumes MacOS version 10.x.x and fails on any other version. I think this is quite ridiculous for a tutorial project as the current MacOS versions are 11.x.x. Seems to work if i change the assertion to

jassert (parts[0].getIntValue() >= 10);

At least it runs.

This whole checking makes no sense

SystemStats::OperatingSystemType SystemStats::getOperatingSystemType()
{
   #if JUCE_IOS
   return iOS;
  #else
    StringArray parts;
    parts.addTokens (getOSXVersion(), ".", StringRef());

    jassert (parts[0].getIntValue() == 10);
    const int major = parts[1].getIntValue();
    jassert (major > 2);

    return (OperatingSystemType) (major + MacOSX_10_4 - 4);
   #endif
}

It looks like you are using an old version of JUCE, support for macOS 11 was added in JUCE 6. Please update your version of JUCE to the latest and try running the project again.

I’ve updated and opened the project from Projucer 6. Could it be the old files were included in the downloaded projucer project Zip file?

The tutorial zips don’t contain the JUCE source, just the .jucer project file and the tutorial sources. You need to check the version of the JUCE modules that your Projucer project is pointing to as it sounds like this is an out of date version of JUCE.

You’re right. The global modules path was pointing to JUCE 5. Now it works. Thanks!