-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MacCatalyst] OperatingSystem is currently not working #108694
Comments
From @drasticactions on Wed, 09 Oct 2024 05:31:59 GMT TL;DR macOS reports https://github.com/drasticactions/MauiRepoRedux/tree/MacCatalystVersion
runtime/src/libraries/Common/src/Interop/OSX/System.Native/Interop.iOSSupportVersion.cs Line 11 in abde3f9
runtime/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs Lines 328 to 341 in abde3f9
That value is coming from
It may be that this needed that the To work around it, checking against |
Tagging subscribers to this area: @dotnet/area-system-runtime |
cc @akoeplinger, perhaps we can simplify the parsing something like this main...am11:runtime:patch-15, i.e. only require major version and make other optional (base on -1 val)? |
@am11 I think we should fix this in Environment.OSVersion.MacCatalyst.cs instead and default the patch/build version to 0. We already do that for iOS/macOS in That said, I wonder how this ever worked since e.g. I also don't have a three-part version in |
Tagging subscribers to 'os-maccatalyst': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger |
@vitek-karas we probably need to backport this. |
Yup, whichever solution makes sense. If it's a bit more general, may just cover more platforms. |
The |
This was backported in #109332 |
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 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 xamarin/xamarin-macios#21390
The text was updated successfully, but these errors were encountered: