Class

CBService

CBService and its subclass CBMutableService represent a peripheral’s service—a collection of data and associated behaviors for accomplishing a function or feature of a device (or portions of that device). CBService objects in particular represent services of a remote peripheral device (represented by a CBPeripheral object). Services are either primary or secondary and may contain a number of characteristics or included services (references to other services).

Declaration

class CBService : CBAttribute

Topics

Identifying a Service

var peripheral: CBPeripheral

The peripheral to which this service belongs.

var isPrimary: Bool

A Boolean value indicating whether the type of service is primary or secondary.

Accessing Service Data

var characteristics: [CBCharacteristic]?

A list of characteristics that have been discovered in this service.

var includedServices: [CBService]?

A list of included services that have been discovered in this service.

Relationships

Inherits From

Conforms To

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