Instance Method


Discovers the specified services of the peripheral.


func discoverServices(_ serviceUUIDs: [CBUUID]?)



An array of CBUUID objects that you are interested in. Here, each CBUUID object represents a UUID that identifies the type of service you want to discover.


You can provide an array of CBUUID objects—representing service UUIDs—in the serviceUUIDs parameter. When you do, the peripheral returns only the services of the peripheral that your app is interested in (recommended). If the servicesUUIDs parameter is nil, all the available services of the peripheral are returned; setting the parameter to nil is considerably slower and is not recommended. When the peripheral discovers one or more services, it calls the peripheral:didDiscoverServices: method of its delegate object. If the services of the peripheral are successfully discovered, you can access them through the peripheral’s services property.

See Also

Discovering Services

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

Discovers the specified included services of a service.

var services: [CBService]?

A list of services on the peripheral that have been discovered.

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