---
title: "discoverIncludedServices(_:for:)"
framework: corebluetooth
role: symbol
role_heading: Instance Method
path: "corebluetooth/cbperipheral/discoverincludedservices(_:for:)"
---

# discoverIncludedServices(_:for:)

Discovers the specified included services of a previously-discovered service.

## Declaration

```swift
func discoverIncludedServices(_ includedServiceUUIDs: [CBUUID]?, for service: CBService)
```

## Parameters

- `includedServiceUUIDs`: An array of doc://com.apple.corebluetooth/documentation/CoreBluetooth/CBUUID objects that you are interested in. Here, each doc://com.apple.corebluetooth/documentation/CoreBluetooth/CBUUID object represents a UUID that identifies the type of included service you want to discover.
- `service`: The previously-discovered service whose included services you want to discover.

## Discussion

Discussion You can provide an array of CBUUID objects—representing included service UUIDs—in the includedServiceUUIDs parameter. When you do, the peripheral returns only the services of the peripheral that match the provided UUIDs. note: If the servicesUUIDs parameter is nil, this method returns all of the peripheral’s available services. This is much slower than providing an array of service UUIDs to search for. When the peripheral discovers one or more included services of the specified service, it calls the peripheral(_:didDiscoverIncludedServicesFor:error:) method of its delegate object. After the service discovers its included services, you can access them through the service’s includedServices property.

## See Also

### Discovering Services

- [discoverServices(_:)](corebluetooth/cbperipheral/discoverservices(_:).md)
- [services](corebluetooth/cbperipheral/services.md)
