From @PureWeen on Tue, 08 Oct 2024 20:22:20 GMT
Description
It looks like on MacCatalyst the Build on the Environment.OSVersion.Version is set to "-1" so when you call
if (OperatingSystem.IsMacCatalystVersionAtLeast(18,0))
it resolves to false.
This works fine on iOS just not MacCatalyst
Reproduction
aoperatingsystem.zip
Just run the app and I've set a label on the screen to output the value of OSVersion.Version. I've also included some if statements in the main page you can break point
Catalyst

iOS

Copied from original issue dotnet/macios#21390
From @PureWeen on Tue, 08 Oct 2024 20:22:20 GMT
Description
It looks like on MacCatalyst the Build on the
Environment.OSVersion.Versionis set to "-1" so when you callif (OperatingSystem.IsMacCatalystVersionAtLeast(18,0))it resolves to false.
This works fine on iOS just not MacCatalyst
Reproduction
aoperatingsystem.zip
Just run the app and I've set a label on the screen to output the value of
OSVersion.Version. I've also included some if statements in the main page you can break pointCatalyst
iOS
Copied from original issue dotnet/macios#21390