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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software