toByteArray

fun NSData.toByteArray(): ByteArray

Copies the bytes into a new Kotlin ByteArray (e.g. a model or pixel buffer held by Swift as Data).