nicq
nicq

Reputation: 2304

CBCentral vs CBCentralManager

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?

Upvotes: 0

Views: 1347

Answers (1)

jrturton
jrturton

Reputation: 119242

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.

Upvotes: 7

Related Questions