On 6 Jan 2023, at 16:27, Rob Petrovec wrote:

> Yes, this is a bug that started in 11.7 that doesn’t appear to have been 
> fixed yet in 11.7.2.

Thanks for the confirmation.  Sad that such a serious regression wasn't fixed 
in 11.7.1 nor 11.7.2.

> Have you tried the arguably more robust and less error prone runtime checks 
> of:
>
> Swift
> if #available(macOS 10.16, *) {
>       // macOS 10.16 or later code path
> } else {
>       // code for earlier than 10.16
> }
>
> Objective-C
> if (@available(macOS 10.16, *)) {
>       // macOS 10.16 or later code path
> } else {
>       // code for earlier than 10.16
> }

I'm aware of them, tried switching once, but found that they did not work as 
expected, at least with older Xcodes.  The note I left in my code was:

TODO: "if (@available(macOS 11, *))" doesn't work properly!  It seems to only 
do the right thing if you use at least Xcode 12.2.

Seeing your example makes me wonder if "10.16" would have worked in place of 
"11"...

Sean
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to