---
title: CBService
framework: corebluetooth
role: symbol
role_heading: Class
path: corebluetooth/cbservice
---

# CBService

A collection of data and associated behaviors that accomplish a function or feature of a device.

## Declaration

```swift
class CBService
```

## Overview

Overview CBService objects represent services of a remote peripheral. Services are either primary or secondary and may contain multiple characteristics or included services (references to other services).

## Topics

### Identifying a Service

- [peripheral](corebluetooth/cbservice/peripheral.md)
- [isPrimary](corebluetooth/cbservice/isprimary.md)

### Accessing Service Data

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

## Relationships

### Inherits From

- [CBAttribute](corebluetooth/cbattribute.md)

### Inherited By

- [CBMutableService](corebluetooth/cbmutableservice.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

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