This just like the JSPatch which creates a JS wrapper use Cocoa API in javascript environment.
I think to make the code compile and run for multiple platform, the top level API is the key, not the some-kind-of Objc-based-c-runtime.
Flutter is a good example. Chromium is a better example.
What this shown is more like the failing C# for Apple. I have no idea why so many devs used this, but with the end of Visual Studio for macOS, no more C# for Apple platform.