Closed karansingla007 closed 11 months ago
never seen this issue before.
it's normal for it to be unavailable breifly.
@chipweinberger how can i solve this issue. I couldn't able to scan device.
perhaps you need to call some other FBP method to get bluetooth to initialize?
Which method, would you like to suggest?
nevermind, i'm wrong. setLogLevel is good enough.
this seems like a macOS issue, not FBP issue
try restarting computer
i am already doing this.
FlutterBluePlus.setLogLevel(LogLevel.verbose, color: true);
try restarting computer
youre on macOS 14, this is a new version of macOS and it will have bugs
Just did, Still the problem is same.
make sure you've added permissions. see readme
Our current workaround is to make sure to listen to FlutterBluePlus.adapterState
before doing other calls. Not sure if this works for other cases.
@maham the problem is that FlutterBluePlus.adapterState
gets stuck on unavailable
@karansingla007 any updates?
We need to give permission for that bluetooth access, for that open macos project in xcode-> Runners->Targets->Runner->Signing and capabilities ->App sandbox ->hardware -> enable the bluetooth(tick the check box).
Hope above steps will help you in resolving this issue.
Thanks @thiruarasu16 , I've updated the README & Common Problems.
Requirements
Have you checked this problem on the example app?
No
FlutterBluePlus Version
1.29.6
Flutter Version
channel stable 3.13.9
What OS?
macOS
OS Version
macOS 14.1.1
Bluetooth Module
BLE
What is your problem?
Getting BluetoothAdapterState.unavailable everytime. I am running in MacOs.
Logs