Use ObjectiveC Class from dylib

Toffee

is there a way to use a ObjectiveC class from a dylib in Toffee?
If yes how must a class looks like?

Yes. There are docs here about how to import the header files.

https://docs.elementscompiler.com/Platforms/Cocoa/ImportingLibraries/

Thanks.
What iā€™m missing are the rules what can be imported with the tool.
Must the ObjectiveC Classes following some rules?

Not really. We import all off the core Cocoa APIs without any problems.

1 Like