C
C#2mo ago
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?
GitHub
GitHub - Speykious/SeeShark: Simple C# camera library.
Simple C# camera library. Contribute to Speykious/SeeShark development by creating an account on GitHub.
3 Replies
Speykious
Speykious2mo ago
Welp, guess I'll write in some other language and go through intermediate C bindings...
Speykious
Speykious2mo ago
GitHub
osu-framework/osu.Framework/Platform/MacOS/Native/Class.cs at maste...
A game framework written with osu! in mind. Contribute to ppy/osu-framework development by creating an account on GitHub.
Speykious
Speykious2mo ago
ah yes