Instance Method

centralManagerDidUpdateState:

Invoked when the central manager’s state is updated.

Required.

Declaration

- (void)centralManagerDidUpdateState:(CBCentralManager *)central;

Parameters

central

The central manager whose state has changed.

Discussion

You implement this required method to ensure that Bluetooth low energy is supported and available to use on the central device. You should issue commands to the central manager only when the state of the central manager is powered on, as indicated by the CBCentralManagerStatePoweredOn constant. A state with a value lower than CBCentralManagerStatePoweredOn implies that scanning has stopped and that any connected peripherals have been disconnected. If the state moves below CBCentralManagerStatePoweredOff, all CBPeripheral objects obtained from this central manager become invalid and must be retrieved or discovered again. For a complete list and discussion of the possible values representing the state of the central manager, see the CBCentralManagerState enumeration in CBCentralManager.

See Also

Monitoring Changes to the Central Manager’s State

- centralManager:willRestoreState:

Invoked when the central manager is about to be restored by the system.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software