---
title: "retrieveConnectedPeripherals(withServices:)"
framework: corebluetooth
role: symbol
role_heading: Instance Method
path: "corebluetooth/cbcentralmanager/retrieveconnectedperipherals(withservices:)"
---

# retrieveConnectedPeripherals(withServices:)

Returns a list of the peripherals connected to the system whose services match a given set of criteria.

## Declaration

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

## Parameters

- `serviceUUIDs`: A list of service UUIDs, represented by doc://com.apple.corebluetooth/documentation/CoreBluetooth/CBUUID objects.

## Return Value

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

Discussion The list of connected peripherals can include those that other apps have connected. You need to connect these peripherals locally using the connect(_:options:) method before using them.

## See Also

### Retrieving Lists of Peripherals

- [retrievePeripherals(withIdentifiers:)](corebluetooth/cbcentralmanager/retrieveperipherals(withidentifiers:).md)
