CBPeripheral class represents remote peripheral devices that your app—by means of a central manager (an instance of
CBCentral)—has discovered advertising or is currently connected to. Peripherals are identified by universally unique identifiers (UUIDs), represented by
NSUUID objects. Peripherals may contain one or more services or provide useful information about their connected signal strength.
- iOS 5.0+
- macOS 10.7+
- tvOS 5.0+
You use this class to discover, explore, and interact with the services available on a remote peripheral that supports Bluetooth low energy. A service encapsulates the way part of the device behaves. For example, one service of a heart rate monitor may be to expose heart rate data from the monitor’s heart rate sensor. Services themselves are made up of characteristics or included services (references to other services). Characteristics provide further details about a peripheral’s service. For example, the heart rate service just described may contain one characteristic that describes the intended body location of the device’s heart rate sensor and another characteristic that transmits heart rate measurement data. Finally, characteristics contain any number of descriptors that provide more information about the characteristic’s value, such as a human-readable description and a way to format the value.