We need to implement a funtion in kotlin with the following signature
fun foo(args: List<*>)
the args list contains many different types of arguments (Strings, Int, Bool, Callbacks). This function foo is called from Native code on ios. If a Callback(function pointer in native code) is part of the args list, kotlin converts it to a Double and we don't know how to call it in kotlin. The args parameter is very generic, because this is part of a framework integration project, which also uses code generation and so we have to handle the dynamic list of parameters at runtime.
Leon Kiefer
03/29/2022, 1:23 PM
the signature of foo is generated by a object c header file where the args parameter has type
(NSArray *)
Leon Kiefer
03/29/2022, 1:41 PM
looks like the object c library does not return actual function pointers but only some handles (Double values) which must be used to call the callbacks via the object c library