<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreBluetooth",
  "identifier" : "/documentation/CoreBluetooth/CBMutableService",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Bluetooth"
    ],
    "preciseIdentifier" : "c:objc(cs)CBMutableService"
  },
  "title" : "CBMutableService"
}
-->

# CBMutableService

A service with writeable property values.

```
class CBMutableService
```

## Overview

The [`CBMutableService`](/documentation/CoreBluetooth/CBMutableService) class adds write access to all of the properties in the [`CBService`](/documentation/CoreBluetooth/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`](/documentation/CoreBluetooth/CBPeripheralManager) object). After creating a service, you can add it to the peripheral’s local database using the [`add(_:)`](/documentation/CoreBluetooth/CBPeripheralManager/add(_:)) method of the [`CBPeripheralManager`](/documentation/CoreBluetooth/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

[`-  initWithType:primary:`](/documentation/CoreBluetooth/CBMutableService/init(type:primary:))

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

### Managing a Mutable Service

[`characteristics`](/documentation/CoreBluetooth/CBMutableService/characteristics)

A list of characteristics of a service.

[`includedServices`](/documentation/CoreBluetooth/CBMutableService/includedServices)

A list of included services.

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`CBService`](/documentation/CoreBluetooth/CBService)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)