Hi,
I am new to SWIG and am having difficulties understanding how to best use SWIG on C++ Callbacks to generate appropriate SWIG C# for iOS which is AOT only. ( SWIG C# for java/Android works great since JIT is allowed )
I have resolved the pjsua2PINVOKE.SWIGExceptionHelper class:
1. Added the [ObjCRuntime.MonoNativeFunctionWrapper] descriptor to the delegates
2. Added the [ObjCRuntime.MonoPInvokeCallback(typeof(ExceptionDelegate))] descriptor to the static functions.
Now I have encountered issues with callbacks using directors, how do I resolve?
Call.cs SWIG generated code:
[ObjCRuntime.MonoNativeFunctionWrapper]
public delegate void SwigDelegateCall_0(global::System.IntPtr prm);
[ObjCRuntime.MonoPInvokeCallback(typeof(SwigDelegateCall_0))]
private void SwigDirectoronCallState(global::System.IntPtr prm) {
onCallState(new OnCallStateParam(prm, false));
}
1. Added [ObjCRuntime.MonoNativeFunctionWrapper] descriptor to the delgates
2. Attempted to add [ObjCRuntime.MonoPInvokeCallback(typeof(SwigDelegateCall_0))] descriptor, but it won't work on non-static functions.
What is the best practice for having SWIG generate the appropriate Callbacks?
Thank you for your time and assistance,
~Casey
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org