0

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.

TruMan1
  • 33,665
  • 59
  • 184
  • 335
  • There is a not-so-bad example of how to implement this in [RFduino iOS code repo](https://github.com/RFduino/RFduino). – Rok Jarc Jun 12 '16 at 06:14

1 Answers1

2

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.

Paulw11
  • 108,386
  • 14
  • 159
  • 186