Discovers the specified services of the peripheral.
- iOS 5.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 4.0+
- Core Bluetooth
You can provide an array of
CBUUID objects—representing service UUIDs—in the
service 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(_:: method of its delegate object. After a peripheral discovers services, you can access them through the peripheral’s