Skip to content

Commit

Permalink
Automatically sets peripherial delegate for ios if not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reedyuk committed Jan 10, 2025
1 parent 0b288dd commit 5119887
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ org.gradle.configureondemand = false
android.useAndroidX=true
android.enableJetifier=true

version=2.2.2
version=2.2.3
group=dev.bluefalcon
libraryName=blue-falcon
kotlinx_coroutines_version=1.9.0
Expand Down
4 changes: 1 addition & 3 deletions library/src/nativeMain/kotlin/dev/bluefalcon/BlueFalcon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ actual class BlueFalcon actual constructor(
bluetoothCharacteristic: BluetoothCharacteristic,
notify: Boolean
) {
if (bluetoothPeripheral.bluetoothDevice.delegate == null) {
bluetoothPeripheralManager.setPeripheralDelegate(bluetoothPeripheral)
}
bluetoothPeripheralManager.setPeripheralDelegate(bluetoothPeripheral)
log?.info("notifyCharacteristic setNotify for ${bluetoothCharacteristic.uuid} notify: $notify")
bluetoothPeripheral.bluetoothDevice.setNotifyValue(notify, bluetoothCharacteristic.characteristic)
}
Expand Down

0 comments on commit 5119887

Please sign in to comment.