Listening for events in unity from native ios plugin

Hello,

This is my very first time writing an iOS plugin that should enable bluetooth on iOS and advertise data using BLE. Most of that i have covered but i havent quite figured out how to listen for events happening on a native level.

Do I pass a callback along to the native function?

you can marshall a pointer back and forth, or you can use UnitySendMessage from the plugin

Is there a more definitive guide? Unity docs are rather lack luster on the topic.

i’d use UnitySendMessage it’s super simple and works as documented e.g. here Unity - Manual: Native plug-ins for iOS

as for a delegate marshalling - that’s mono/.net stuff, so look for more definitive guide there
but it goes something like this - OS X Native plugin callback functions - Questions & Answers - Unity Discussions