KotlinByteArray to/from NSData in iOS? I have been...
# ios
h
KotlinByteArray to/from NSData in iOS? I have been struggling for hours trying to make my MPP code with with iOS regarding to NSData, and no examples I have found seems to work. I have a Kotlin function that takes a ByteArray as input, and another producing a ByteArray as output. This works perfectly in Java, mapping to byte[], but I have no idea how in iOS I can convert it to/from NSData that can be used in Swift. Any ideas?
a
h
usePinned is not defined
a
Are you using it in common code? It is native-specific thing, see https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.cinterop/use-pinned.html
h
Nevermind, find the import. Something compiles now - will continue trying. Thank you
a
Oh ok 🙂
h
Awesome, I finally got it all working. Thank you so much 🙂
468 Views