When I retrieve either operatingSystemVersion or the operatingSystemVersionString from [NSProcessInfo processInfo], I get 10.16 while I'm running on Monterey 12.3.1.
Is it a known problem? Is there another way to retrieve an accurate OS version?
Building and running on macOS 12.3.1, base SDK 10.14, deployment target 10.13
Building and running on macOS 12.3.1, base SDK 10.14
It’s because your app is built with an old SDK version. You’re seeing a clever compatibility trick to sidestep bugs in some (or many) older apps that checked the version number in an unsafe way. If you raise your SDK to the current version, then you should get the true version string.
Here’s one article that explains it pretty well: https://eclecticlight.co/2020/07/06/why-big-sur-wont-stumble-over-version-numbers/