Instance Method

retrieveConnectedPeripherals(withServices:)

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

Declaration

func retrieveConnectedPeripherals(withServices serviceUUIDs: [CBUUID]) -> [CBPeripheral]

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.

Discussion

The list of connected peripherals can include those that are connected by other apps and that will need to be connected locally using the connect(_:options:) method before they can be used.

See Also

Retrieving Lists of Peripherals

func retrievePeripherals(withIdentifiers: [UUID]) -> [CBPeripheral]

Returns a list of known peripherals by their identifiers.