Skip to content

Commit 64a4603

Browse files
authored
Merge pull request #234 from facetious/facetious/fix-ios-check
fix(ios): Ensure the Central Manager is created prior to waiting for the bluetooth_status_event.
2 parents dff7981 + 999616f commit 64a4603

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bluetooth.ios.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ export class Bluetooth extends BluetoothCommon {
770770
if (Trace.isEnabled()) {
771771
CLog(CLogTypes.info, 'isBluetoothEnabled', 'central manager not ready, waiting for it to start');
772772
}
773+
this.ensureCentralManager();
773774
return new Promise<boolean>((resolve) => {
774775
this.once(BluetoothCommon.bluetooth_status_event, ()=> {
775776
resolve(this._isEnabled());

0 commit comments

Comments
 (0)