Hi all,
I am having to consume a third party library that exposes a single method but relies on me implementing a set of functions that it can then call back to.
So following the documentation for binding projects, I have created the wrapped call in the ApiDefinition, and defined a delegate that would handle the call back.
The API for the call looks like this:
void someFunction(struct parameter *, int (*)(void));
And the binding code:
public delegate void callback(NSObject obj, ref string message);
[BaseType (typeof(NSObject))[
public interface MyAPIWrapper
{
[static, Export("someFunction:callback:")]
void someFunction(someStruct param1, callback callMe);
}
This compiles in the .Net world, but when compiled to Native, it returns:
btouch: Do not know how to make a trampoline for System,String& message (BI1001)
I don't control the library I need to call, so I am hoping someone can help me resolve this. If I remove the ref, it links properly, but that obviously doesn't help me.
Cheers all