The CBMutableService class adds write access to all of the properties in the CBService class it inherits from. You use this class to create a service or an included service on a local peripheral device (represented by a CBPeripheralManager object). After you create a service, you can add it to the peripheral’s local database using the add(_:) method of the CBPeripheralManager class. After you add a service to the peripheral’s local database, the service is cached and you can no longer make changes to it.


Initializing a Mutable Service

init(type: CBUUID, primary: Bool)

Returns a newly initialized mutable service specified by UUID and service type.

Managing a Mutable Service

var uuid: CBUUID?

The Bluetooth-specific UUID of the service.

var isPrimary: Bool

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

var characteristics: [CBCharacteristic]?

A list of characteristics of a service.

var includedServices: [CBService]?

A list of included services.


Inherits From