Yes, this is a bug that started in 11.7 that doesn’t appear to have been fixed yet in 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 } —Rob > On Jan 6, 2023, at 1:32 PM, Sean McBride via Cocoa-dev > <cocoa-dev@lists.apple.com> wrote: > > Hi all, > > On at least 3 Macs in my office, running macOS 11.7 or 11.7.2, > NSAppKitVersionNumber (at runtime) is 2202.7 (sic). This conflicts with > NSApplication.h which has: > > static const NSAppKitVersion NSAppKitVersionNumber11_0 = 2022; > static const NSAppKitVersion NSAppKitVersionNumber11_1 = 2022.2; > static const NSAppKitVersion NSAppKitVersionNumber11_2 = 2022.3; > static const NSAppKitVersion NSAppKitVersionNumber11_3 = 2022.4; > static const NSAppKitVersion NSAppKitVersionNumber11_4 = 2022.5; > static const NSAppKitVersion NSAppKitVersionNumber11_5 = 2022.6; > > I had a macOS 11.2 installer lying around, and installed it in a VM, and > there NSAppKitVersionNumber is 2022.3 as expected. > > I can't help but note that 2202 looks like a typo vs 2022! > > As 2202.7 is larger than NSAppKitVersionNumber12_0 (2113) it results in going > into branches that should be Monterey-only. Ouch. > > Has anyone else observed this? > > Thanks, > > 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/petrock%40mac.com > > This email sent to petr...@mac.com _______________________________________________ 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