New to objective-C and macOS,
My goal is to figure out whether platform on which application is running is Catalina 10.15 or an older platform. (App can be running on any platform from 10.5 to 10.15).
I searched how to find the platform version on macOS, but apparently there is no consistent API.
This one is available from 10.10+
[[NSProcessInfo processInfo] operatingSystemVersion]
If API operatingSystemVersion is called on older platforms than 10.10, will the program crash or nil will be returned ? Can API be used in this way
if (operatingSystemVersion == nil)
{
//platform is Lower than 10.10
}
else
{
//platform is operatingSystemVersion
}