Speykious
Native bindings to MacOS ObjC classes?
It's very easy to have C bindings in C# on both Windows and Linux, but I'm really struggling to know how to get ObjC bindings to native classes on MacOS.
So far my only clue is this HelloMacOS project which I managed to make work on .NET 8 without much trouble, but the problem now is that it can only target
net8.0-macos
, which is not what I want.
For context, this is for my cross-platform camera library SeeShark which I'm rewriting from scratch without FFmpeg, so it'll target net8.0
and be able to run on Windows, Linux and MacOS.
How am I supposed to do this? Do I really need to have net8.0-macos
in there? In that case, how do I deal with compilation? Do I maybe have to create a separate csproj that I conditionally depend on?4 replies