0

What is a difference between them? When should I use CBCentral and when CBCentralManager?

As I understood, Both CBCentralManager and CBCentral are used to manage connections, but CBCentral allows mobile app to acts as another BLE device, am I right?

nicq
  • 2,182
  • 5
  • 22
  • 38

1 Answers1

7

No, you're not.

CBCentral is a model object representing a separate device, to which your app is acting as a peripheral - in which case you'd have a running CBPeripheralManager object to drive this.

CBCentralManager is when your app (and therefore your device) is acting as a central, and is looking for peripherals - these will be modelled in your app as CBPeripheral objects.

So in summary - the ...Manager objects are what your app is doing (is it a Central, or a Peripheral?).

The CBCentral and CBPeripheral objects represent other things that your app is connected to.

jrturton
  • 118,105
  • 32
  • 252
  • 268