We need to implement a funtion in kotlin with the ...
# kotlin-native
l
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.
the signature of foo is generated by a object c header file where the args parameter has type
(NSArray *)
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
a
I guess this YouTrack issue might be related: https://youtrack.jetbrains.com/issue/KT-41880