Skip to content

Commit

Permalink
iOS / macOS: fix: BLE detection failed due to breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrf committed Oct 10, 2024
1 parent 7d016fd commit 3ce8560
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ packages:
dependency: "direct main"
description:
name: flutter_blue_plus
sha256: "1e53ba4b60c1097396fbeafdd31eac5c20b0876b56a0c1ab6f3dec5ee06d44d7"
sha256: ddbed8d86199ab4342152b2f5ce9a7ea8b348219f6880da3e7899f0a73d2dae3
url: "https://pub.dev"
source: hosted
version: "1.32.0"
version: "1.33.4"
flutter_lints:
dependency: "direct dev"
description:
Expand Down
2 changes: 1 addition & 1 deletion lib/ble_device_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class BleDeviceCubit extends Cubit<BleDeviceState> {
isPaired = await device.bondState.first == BluetoothBondState.bonded;
} else {
// NOTE: this is a workaround to check if the device is paired for macOS and iOS
final systemDevices = await FlutterBluePlus.systemDevices;
final systemDevices = await FlutterBluePlus.systemDevices([gkServiceUuid]);
isPaired = systemDevices.contains(device);
}
logger.info("device is ${isPaired ? "" : "not "}paired");
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_blue_plus: ^1.32.0
flutter_blue_plus: ^1.33.0
flutter_bloc: ^8.1.5
logging: ^1.2.0
permission_handler: ^11.3.0
Expand Down

0 comments on commit 3ce8560

Please sign in to comment.