dotintent / FlutterBleLib

Bluetooth Low Energy library for Flutter with support for simulating peripherals
Apache License 2.0
537 stars 197 forks source link

iOS not scanning peripherals when scanning again immediately #624

Open iamongit opened 2 years ago

iamongit commented 2 years ago

There's already an open issue related to this (#580) but in my case it worked fine 1st time and then it's not scanning anything after that. It works fine on Android. My flow is create client, scan, connect, disconnect, destroy client. Then when I create a client again and start scanning it doesn't scan any peripheral. What am I missing?

On Flutter Stable 3.0.5

UPDATE: So I followed the example workflow and never destroy the client, I just stop scanning and disconnect from the device. Now I am able to scan every time successfully. Is this the right way to do it as I'm not destroying the client after I'm done scanning and pairing? If I destroy the client and then create a new one I am not able to perform any operations using the bleManager, not just scanning.