On MacOS 11.1 'Big Sur'
OSVersion() in PB 5.73 incorrectly returns the ID of MacOS 10.9 'Mavericks':
Code:
Debug #PB_OS_MacOSX_10_9 ; 10900
Debug #PB_OS_MacOSX_Future ; 60000
Debug OSVersion() ; 10900
Furthermore the constants #PB_OS_MacOSX_10_15 (Catalina) and #PB_OS_MacOSX_11 (Big Sur) are still missing.
You may use this workaround to get the major and minor version of your current MacOS which is compatible down to MacOS 10.2. There are newer methods available but they require at least MacOS 10.10 'Yosemite'!
Code:
Procedure.S GetMacOSMajorAndMinorVersion()
Protected MacOSVersion.S
MacOSVersion = StringField(PeekS(CocoaMessage(0, CocoaMessage(0,
CocoaMessage(0, 0, "NSProcessInfo processInfo"),
"operatingSystemVersionString"), "UTF8String"), -1, #PB_UTF8), 2, " ")
ProcedureReturn StringField(MacOSVersion, 1, ".") + "." +
StringField(MacOSVersion, 2, ".")
EndProcedure
MessageRequester("Info", "MacOS version: " + GetMacOSMajorAndMinorVersion())
You should also be aware that Apple changed its release numbering policy with Big Sur:
This is the first release since Mac OS 9 where point releases increment the second component of the release number, unlike prior releases where point releases incremented the third component of the release number and major releases increments the second component of the release number.