Skip to content

Commit

Permalink
Fix: Under MAUI for macOS, NativeMethods incorrectly assume the runin…
Browse files Browse the repository at this point in the history
…g system is Windows, but it's MacCatalyst.
  • Loading branch information
unalone authored Feb 17, 2025
1 parent 352c778 commit 2b5529b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,10 @@ public static bool IsUnix()
p == PlatformID.MacOSX ||
(int)p == 128);
#elif NETCOREAPP3_1_OR_GREATER
return RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ||
RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD);
return OperatingSystem.IsMacCatalyst() ||
OperatingSystem.IsFreeBSD() ||
OperatingSystem.IsLinux() ||
OperatingSystem.IsMacOS();
#else
return RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
Expand Down

0 comments on commit 2b5529b

Please sign in to comment.