Kotlin Multiplatform: How to call getOriginalKotlinClass from swift?

676 views Asked by At

How to get Kotlin Class from swift code? I need it for dependency inection. In documentation it says that there's a method getOriginalKotlinClass, but where can I get it?

For example I have an object that is available in swift from Kotlin library JsonCacheClient, how do I get its kotlin class?

1

There are 1 answers

0
Róbert Nagy On BEST ANSWER

Try creating a method in Kotlin, which calls getOriginalKotlinClass, expose it and call this method from Swift.

See this comment for more info