Contents

discoverIncludedServices(_:for:)

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

Declaration

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

Parameters

  • includedServiceUUIDs:

    An array of Cbuuid objects that you are interested in. Here, each 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

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.

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