MacOS API level restricted by Unity? (Plugin)

I am writing a simple plugin to access the GameController framework directly, the code is working and I am able to access the various elements and feed them back to Unity fine.

My issue is that this plugin will need to function on systems running either MacOs 11.x (BigSur) or MacOS 10.15.x (Catalina), and portions of the API I am accessing are only present within 11.x.

This should be simple enough to solve by enclosing the newer API calls with if(@available(macOS 11.0, *)) However this is not working when the plugin is called from within Unity! I added a test call of

- (BOOL) BigSur
{
  if(@available(macOS 11.0, *)) {
    return TRUE;

  return FALSE;
}

Which within a simple XCode test app works as intended, but when called from within Unity on the same machine (BigSur) always returns false!?

I can only assume that Unity is restricting the API calls for plugins? Is there some way of removing or raising this limitation?

Thanks

Further to this I have done more digging and it seems that when run under Unity the version of MacOS reports as 10.16 for BigSur (this is Unity 2019.2.3f1, yeah I know… don’t ask :slight_smile: )

This might give me a work around using the output of

[[NSProcessInfo processInfo] operatingSystemVersion]

and checking the major and minor versions for 11.x or 10.16 to indicate BigSur.