File tree Expand file tree Collapse file tree
darwin/Classes/ReactiveBle
reactive_ble_platform_interface Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ packages:
220220 path: "../packages/flutter_reactive_ble"
221221 relative: true
222222 source: path
223- version: "5.4.0 "
223+ version: "5.4.1 "
224224 flutter_test:
225225 dependency: "direct dev"
226226 description: flutter
@@ -464,14 +464,14 @@ packages:
464464 path: "../packages/reactive_ble_mobile"
465465 relative: true
466466 source: path
467- version: "5.4.0 "
467+ version: "5.4.1 "
468468 reactive_ble_platform_interface:
469469 dependency: "direct overridden"
470470 description:
471471 path: "../packages/reactive_ble_platform_interface"
472472 relative: true
473473 source: path
474- version: "5.4.0 "
474+ version: "5.4.1 "
475475 shelf:
476476 dependency: transitive
477477 description:
Original file line number Diff line number Diff line change 11name : flutter_reactive_ble_example
22description : Demonstrates how to use the flutter_reactive_ble plugin.
3- version : 5.4.0
3+ version : 5.4.1
44publish_to : ' none'
55
66environment :
@@ -10,7 +10,7 @@ environment:
1010dependencies :
1111 flutter :
1212 sdk : flutter
13- flutter_reactive_ble : ^5.4.0
13+ flutter_reactive_ble : ^5.4.1
1414 functional_data : ^1.0.0
1515 intl : ^0.17.0
1616
Original file line number Diff line number Diff line change 1+ ## 5.4.1
2+
3+ * Prevent index out of range crash when filtering services and characteristics #919
4+ * Improve stack trace of exceptions from read(Characteristic) #896
5+ * Upgraded protobuf to v3 and upgraded the android example to fix the deprecated imperative apply of gradle plugins #871
6+
17## 5.4.0
28
39* Support for MacOS #889
Original file line number Diff line number Diff line change @@ -433,14 +433,14 @@ packages:
433433 path: "../reactive_ble_mobile"
434434 relative: true
435435 source: path
436- version: "5.4.0 "
436+ version: "5.4.1 "
437437 reactive_ble_platform_interface:
438438 dependency: "direct main"
439439 description:
440440 path: "../reactive_ble_platform_interface"
441441 relative: true
442442 source: path
443- version: "5.4.0 "
443+ version: "5.4.1 "
444444 shelf:
445445 dependency: transitive
446446 description:
Original file line number Diff line number Diff line change 11name : flutter_reactive_ble
22description : Reactive Bluetooth Low Energy (BLE) plugin that can communicate with multiple devices
3- version : 5.4.0
3+ version : 5.4.1
44homepage : https://github.com/PhilipsHue/flutter_reactive_ble
55
66environment :
@@ -21,8 +21,8 @@ dependencies:
2121 sdk : flutter
2222 functional_data : ^1.0.0
2323 meta : ^1.3.0
24- reactive_ble_mobile : ^5.4.0
25- reactive_ble_platform_interface : ^5.4.0
24+ reactive_ble_mobile : ^5.4.1
25+ reactive_ble_platform_interface : ^5.4.1
2626
2727dependency_overrides :
2828 reactive_ble_mobile :
Original file line number Diff line number Diff line change 1+ ## 5.4.1
2+
3+ * Prevent index out of range crash when filtering services and characteristics #919
4+ * Improve stack trace of exceptions from read(Characteristic) #896
5+ * Upgraded protobuf to v3 and upgraded the android example to fix the deprecated imperative apply of gradle plugins #871
6+
17## 5.4.0
28
39* Support for MacOS #889
Original file line number Diff line number Diff line change @@ -366,13 +366,21 @@ final class Central {
366366 private func resolve( characteristic characteristicInstance: CharacteristicInstance ) throws -> CBCharacteristic {
367367 let peripheral = try resolve ( connected: characteristicInstance. peripheralID)
368368
369- guard let service = peripheral. services? . filter ( { $0. uuid == characteristicInstance. serviceID } ) [ Int ( characteristicInstance. serviceInstanceID) ?? 0 ]
369+ let filteredServices = peripheral. services? . filter { $0. uuid == characteristicInstance. serviceID } ?? [ ]
370+ let serviceIndex = Int ( characteristicInstance. serviceInstanceID) ?? 0
371+
372+ guard serviceIndex >= 0 , serviceIndex < filteredServices. count
370373 else { throw Failure . serviceNotFound ( characteristicInstance. serviceID, characteristicInstance. peripheralID) }
371374
372- guard let characteristic = service. characteristics? . filter ( { $0. uuid == characteristicInstance. id } ) [ Int ( characteristicInstance. instanceID) ?? 0 ]
375+ let service = filteredServices [ serviceIndex]
376+
377+ let filteredCharacteristics = service. characteristics? . filter { $0. uuid == characteristicInstance. id} ?? [ ]
378+ let characteristicsIndex = Int ( characteristicInstance. instanceID) ?? 0
379+
380+ guard characteristicsIndex >= 0 , characteristicsIndex < filteredCharacteristics. count
373381 else { throw Failure . characteristicNotFound ( characteristicInstance) }
374382
375- return characteristic
383+ return filteredCharacteristics [ characteristicsIndex ]
376384 }
377385
378386 private enum Failure : Error , CustomStringConvertible {
Original file line number Diff line number Diff line change @@ -425,7 +425,7 @@ packages:
425425 path: "../reactive_ble_platform_interface"
426426 relative: true
427427 source: path
428- version: "5.4.0 "
428+ version: "5.4.1 "
429429 shelf:
430430 dependency: transitive
431431 description:
Original file line number Diff line number Diff line change 11name : reactive_ble_mobile
22description : Official Android and iOS implementation for the flutter_reactive_ble plugin.
3- version : 5.4.0
3+ version : 5.4.1
44homepage : https://github.com/PhilipsHue/flutter_reactive_ble
55
66environment :
@@ -11,7 +11,7 @@ dependencies:
1111 flutter :
1212 sdk : flutter
1313 protobuf : ^3.0.0
14- reactive_ble_platform_interface : ^5.4.0
14+ reactive_ble_platform_interface : ^5.4.1
1515
1616dev_dependencies :
1717 build_runner : ^2.3.3
Original file line number Diff line number Diff line change 1+ ## 5.4.1
2+
3+ * Prevent index out of range crash when filtering services and characteristics #919
4+ * Improve stack trace of exceptions from read(Characteristic) #896
5+ * Upgraded protobuf to v3 and upgraded the android example to fix the deprecated imperative apply of gradle plugins #871
6+
17## 5.4.0
28
39* Support for MacOS #889
You can’t perform that action at this time.
0 commit comments