---
title: CBMutableService
framework: corebluetooth
role: symbol
role_heading: Class
path: corebluetooth/cbmutableservice
---

# CBMutableService

A service with writeable property values.

## Declaration

```swift
class CBMutableService
```

## Overview

Overview 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 creating 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, Core Bluetooth caches the service and you can no longer make changes to it.

## Topics

### Creating a Mutable Service

- [init(type:primary:)](corebluetooth/cbmutableservice/init(type:primary:).md)

### Managing a Mutable Service

- [characteristics](corebluetooth/cbmutableservice/characteristics.md)
- [includedServices](corebluetooth/cbmutableservice/includedservices.md)

## Relationships

### Inherits From

- [CBService](corebluetooth/cbservice.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Services

- [CBService](corebluetooth/cbservice.md)
- [CBCharacteristic](corebluetooth/cbcharacteristic.md)
- [CBMutableCharacteristic](corebluetooth/cbmutablecharacteristic.md)
- [CBDescriptor](corebluetooth/cbdescriptor.md)
- [CBMutableDescriptor](corebluetooth/cbmutabledescriptor.md)
