Instance Method


Invoked when the central manager’s state is updated.



func centralManagerDidUpdateState(_ central: CBCentralManager)



The central manager whose state has changed.


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 CBCentralManagerState.poweredOn constant. A state with a value lower than CBCentralManagerState.poweredOn implies that scanning has stopped and that any connected peripherals have been disconnected. If the state moves below CBCentralManagerState.poweredOff, 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

func centralManager(CBCentralManager, willRestoreState: [String : Any])

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