-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS Advertisement isConnectable always null #697
Comments
R4leven
changed the title
iOS Advertisement always null
iOS Advertisement isConnectable always null
Jun 20, 2024
Aw yes, that looks like a bug. Thanks for the thorough analysis of the issue! I'll get a fix up soon. |
@R4leven let me know if you need me to back port the fix to Kable 0.32.x (i.e. if you're not ready for Kable 0.33.x w/ K2 upgrade yet). |
Thank you for the quick reply and fix. We are planning on upgrading to 0.33.x soon, so no back port is needed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
We want to filter out non-connectable BLE devices based on some conditions and are using the isConnectable flag on the Advertisement.
The flag works on Android, but on iOS it is always null, even for connectable devices.
Maybe the cast of the CBAdvertisementDataIsConnectable value to Boolean is not working correctly.
kable/core/src/appleMain/kotlin/CBPeripheralCoreBluetoothAdvertisement.kt
Line 43 in aee205e
I tested it without KMP and a CBCentralManager on iOS and the value was set to 1.
Perhaps the value needs to be cast to NSNumber (which is stated here: https://developer.apple.com/documentation/corebluetooth/cbadvertisementdataisconnectable) and then the boolValue needs to be used.
using com.juul.kable:core:0.31.1 and iOS 17.5.1
The text was updated successfully, but these errors were encountered: