Hello! Is there any way of using a javascript libr...
# multiplatform
c
Hello! Is there any way of using a javascript library on the multiplatform common code?
g
no, common code cannot have any platoform-specific dependendencies
c
Damn.. thanks for the quick answer! Do you know perhaps for something like this: https://github.com/InteractiveAdvertisingBureau/iabtcf-es but for Kotlin?
g
No, I’m noty aware about any Kotlin only implementations, but you can declare expected interface and use platform specific libraries on platform code: https://kotlinlang.org/docs/reference/platform-specific-declarations.html
What kind platforms do you target?
c
I’m targeting iOS and Android
g
Looks that there is a java implementation too: https://github.com/InteractiveAdvertisingBureau/iabtcf-java
but for iOS you need C version of it
c
yeah, that’s what i figured out 😛 I’ll need to see if I’m able to implement their stuff into a kotlin lib
g
if there is some business logic on Java, you can convert it to Kotlin first, and try to get rid of platform specific declarations, as first step of porting Is not necessary easier, I think detects on project