Feature request: Add maximumWriteValueLengthForType to iOS Peripheral
Hi, it would be great if you could add maximumWriteValueLengthForType to the CoreBluetoothPeripheral interface.
Sample:
override fun maximumWriteValueLengthForType(writeType: WriteType): Int {
val type = when (writeType) {
WithResponse -> CBCharacteristicWriteWithResponse
WithoutResponse -> CBCharacteristicWriteWithoutResponse
}
return cbPeripheral.maximumWriteValueLengthForType(type).toInt()
}
Thanks for the code snippet. This would be a good addition. I'll try to add it soon.
Hey Travis @twyatt, I have a use-case that requires this functionality. Are there any plans to add this in the near future? Thank you for your support and for a solid KMP library.
I would like to get to this sooner rather than later, but not sure I'll have much bandwidth in the near term.
The biggest challenge (though it may not be that big) is to figure out a unified API across all supported platforms.
I may be able to find some time after getting a final 0.35.0 release out.
PRs are also welcome, and I try to prioritize them above most other work I have on my plate. 😉
I made a PR implementing this. I haven't been able to test this properly, but as I'm only reading data I believe this should be fairly safe in any case.