Inherits from CBCentralManager
Declared in BWCentralManager.h

Overview

This class exposes APIs to connect to beacon and retrieve its services.

Instance Methods

cancelPeripheralConnection:

Cancels an active or pending local connection to a peripheral.

- (void)cancelPeripheralConnection:(CBPeripheral *)peripheral

Parameters

peripheral

The peripheral to which the central manager is either trying to connect or has already connected.

Declared In

BWCentralManager.h

connectPeripheral:options:

Establishes a local connection to a peripheral.

- (void)connectPeripheral:(CBPeripheral *)peripheral options:(NSDictionary *)options

Parameters

peripheral

The peripheral to which the central is attempting to connect.

options

A dictionary to customize the behavior of the connection.

Declared In

BWCentralManager.h

retrieveConnectedPeripheralsWithServices:

Returns a list of the peripherals (containing any of the specified services) currently connected to the system.

- (NSArray *)retrieveConnectedPeripheralsWithServices:(NSArray *)serviceUUIDs

Parameters

serviceUUIDs

A list of service UUIDs (represented by CBUUID objects).

Return Value

A list of the peripherals that are currently connected to the system and that contain any of the services specified in the serviceUUID parameter.

Declared In

BWCentralManager.h

retrievePeripheralsWithIdentifiers:

Returns a list of known peripherals by their identifiers.

- (NSArray *)retrievePeripheralsWithIdentifiers:(NSArray *)identifiers

Parameters

identifiers

A list of peripheral identifiers (represented by NSUUID objects) from which CBPeripheral objects can be retrieved.

Return Value

A list of peripherals that the central manager is able to match to the provided identifiers.

Declared In

BWCentralManager.h

scanForPeripheralsWithServices:options:

Scans for peripherals that are advertising services.

- (void)scanForPeripheralsWithServices:(NSArray *)serviceUUIDs options:(NSDictionary *)options

Parameters

serviceUUIDs

An array of CBUUID objects that the app is interested in. In this case, each CBUUID object represents the UUID of a service that a peripheral is advertising.

options

An optional dictionary specifying options to customize the scan.

Declared In

BWCentralManager.h

stopScan

Asks the central manager to stop scanning for peripherals.

- (void)stopScan

Declared In

BWCentralManager.h