systemInformationMBS.isYosemite - breaks in 2021r1

The code:

Dim b As Boolean = SystemInformationMBS.isYosemite

Used to return true for Big Sur in 2020r2, but now produces false in 2021r1.

@Christian_Schmitz any thoughts?

Chances are that means it only checks the sub version number. So numbers like 10.9 and 11.0 become 9 and 0 and since 0 < 9, poof, not Yosemite.

1 Like

Which is why for decades Apple have recommend NOT using the OS version to determine feature availability. Apple have functionality to check to see if a class exists or if an object supports a method/function.

However with macBS, so many changes are visual not functional, and with Core Image different functions are broken in different ways for different versions of the OS, that I ended up having to do a version check.

In Yosemite, Apple added Apple Developer Documentation where the OS will do the version comparison (on all 3 places) so I would recommend using that if you can/must.

That doesn’t work for BS because it can’t decide what it is, 10.16 or 11.x.

And the code works fine for me in 2021r1, M1.

In 2019r3 we added System.Version

https://docs.xojo.com/System.Version

So you can type

If System.Version >= "10.10" Then

This will tell you if the OS is at least Yosemite.

This method handles 10.16 as if it were 11.0 so it should work going forward.

1 Like

if you need to use big sur functions or visual style, >= 10.16. We’ll find out in a few months what the next OS version is going to be.

If I understand it correctly, using Xojo 2021 should report 11.x?

Do you use recent plugins?
Because I thought we fixed that long ago.

That was fixed in MBS Plugins 21.0

Thanks Christian - I will update and try again.

21.1 works fine - thanks.

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.