discoverServices(_:)
Discovers the specified services of the peripheral.
Declaration
func discoverServices(_ serviceUUIDs: [CBUUID]?)Parameters
Discussion
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 match the provided UUIDs.
When the peripheral discovers one or more services, it calls the peripheral(_:didDiscoverServices:): method of its delegate object. After a peripheral discovers services, you can access them through the peripheral’s services property.