---
title: isPrimary
framework: corebluetooth
role: symbol
role_heading: Instance Property
path: corebluetooth/cbservice/isprimary
---

# isPrimary

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

## Declaration

```swift
var isPrimary: Bool { get }
```

## Discussion

Discussion A peripheral’s service is either primary or secondary. A primary service describes the primary function of a device. A secondary service describes a service that’s relevant only in the context of another service that references it. For example, the primary service of a heart rate monitor may be to expose heart rate data from the monitor’s heart rate sensor. In this example, a secondary service may be to expose the sensor’s battery data. If the value of this property is true, the type of service is primary. If the value of this property is false, the type of service is secondary.

## See Also

### Identifying a Service

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