TruMan1
TruMan1

Reputation: 36158

How to tell if CBCentralManager is still processing scanForPeripheralsWithServices?

Is there a way to tell if the CBCentralManager is busy doing a scanForPeripheralsWithServices? I tried looking at the state, but nothing seems to indicate that it's busy scanning.

Upvotes: 0

Views: 296

Answers (1)

Paulw11
Paulw11

Reputation: 115022

There is no property of CBCentralManager that indicates whether it is currently scanning for peripherals. You need to keep track of this yourself.

Typically you would implement your Bluetooth functions in a class and you can add a boolean property to this class which you set to true when you call scanForPeripheralsWithServices and false when you call stopScan.

Upvotes: 2

Related Questions