There should be a macro defined for the OS version. Apple uses these a lot in their headers. Look at a few class headers and you should see enough examples.
toggle quoted messageShow quoted text
Cheers from Chennai,
On Nov 7, 2018, at 1:05 PM, John Brownie <email@example.com> wrote:
Because of other issues, I am having to use Xcode 9.4.1 for my app. However, there is one function that depends on a third-party tool which fails on macOS 10.14. I'd like to disable the command that causes the failure at run-time, so I'm looking for a way to tell whether I'm running on a system later than 10.13. Normally I've done that by checking availability of a particular function, but that depends on having a later SDK. Is there a different way to do it? The code that needs to check is in Obj-C.
(This is only a temporary solution, while I try to get the tool replaced, and complete the rewrite of the whole app into Swift.)
Thanks in advance,
Mussau-Emira language, New Ireland Province, Papua New Guinea