nexussays / ble.net

Cross-platform Bluetooth Low Energy (BLE) library for Android, iOS, and UWP
Mozilla Public License 2.0
186 stars 51 forks source link

Devices not found while scanning #67

Open chris1109 opened 5 years ago

chris1109 commented 5 years ago

I had a problem while scanning for devices. The adapter state was unknown and no devices were found. In order to solve the problem i simply created a new dispatch queue to obtain the default adapter:

BluetoothLowEnergyAdapter.ObtainDefaultAdapter(new DispatchQueue("App.iOS.Communication.ObtainAdapterTask"))

This worked for me. Somehow the default dispatch queue didn't processed the task right. Hope this solution can help someone who faces the same issue.

nexussays commented 5 years ago

Thanks @chris1109! I'll see about making a new dispatch queue by default on iOS