Instance Method

peripheral(_:didDiscoverIncludedServicesFor:error:)

Invoked when you discover the included services of a specified service.

Declaration

optional func peripheral(_ peripheral: CBPeripheral, didDiscoverIncludedServicesFor service: CBService, error: Error?)

Parameters

peripheral

The peripheral providing this information.

service

The CBService object containing the included service.

error

If an error occurred, the cause of the failure.

Discussion

This method is invoked when you app calls the discoverIncludedServices(_:for:) method. If the included services of the specified service are successfully discovered, you can access them through the service’s includedServices property. If successful, the error parameter is nil. If unsuccessful, the error parameter returns the cause of the failure.

See Also

Discovering Services

func peripheral(CBPeripheral, didDiscoverServices: Error?)

Invoked when you discover the peripheral’s available services.