Reedyuk / blue-falcon

A Bluetooth kotlin multiplatform "Cross-Platform" library for iOS and Android
https://bluefalcon.dev
Apache License 2.0
321 stars 43 forks source link

KMP CBCharacteristic only read value #132

Closed TimurGaysin closed 2 weeks ago

TimurGaysin commented 1 month ago

In Swift version, CBCharacteristic have read/write type. (https://developer.apple.com/documentation/corebluetooth/cbcharacteristic)https://developer.apple.com/documentation/corebluetooth/cbcharacteristic/value In blue-falcon KMP version, CBCharacteristic - have only read type(it defined as val) - CBCharacteristic.value cannot be reassigned.

Reedyuk commented 1 month ago

It is a computed property, Computed properties in Kotlin do not store a value directly but compute it on-the-fly using a getter.

https://github.com/Reedyuk/blue-falcon/blob/2448f8f1ed17393ad88a536d50f14e404a6f59ff/library/src/appleMain/kotlin/dev/bluefalcon/BluetoothCharacteristic.kt#L15C5-L22C10

Reedyuk commented 1 month ago

can i ask, where are you getting "value cannot be reassigned"? are you saying this is ocurring during runtime?

Reedyuk commented 2 weeks ago

closing during inactivty