<!--
{
  "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/CBPeripheralManager",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Bluetooth"
    ],
    "preciseIdentifier" : "c:objc(cs)CBPeripheralManager"
  },
  "title" : "CBPeripheralManager"
}
-->

# CBPeripheralManager

An object that manages and advertises peripheral services exposed by this app.

```
class CBPeripheralManager
```

## Overview

Core Bluetooth uses [`CBPeripheralManager`](/documentation/CoreBluetooth/CBPeripheralManager) objects to manage published services within the local peripheral’s Generic Attribute Profile (GATT) database and to advertise these services to central devices (represented by [`CBCentral`](/documentation/CoreBluetooth/CBCentral) objects). While a service is in the database, any connected central can see and connect to it. That said, if your app hasn’t specified the `bluetooth-peripheral` background mode, the contents of its services become disabled when it’s in the background or in a suspended state. In this scenario, any remote central trying to access the service’s characteristic value or characteristic descriptors receives an error.

Before you call [`CBPeripheralManager`](/documentation/CoreBluetooth/CBPeripheralManager) methods, the peripheral manager object must be in the powered-on state, as indicated by the [`CBPeripheralManagerState.poweredOn`](/documentation/CoreBluetooth/CBPeripheralManagerState/poweredOn). This state indicates that the device (your iPhone or iPad, for instance) supports Bluetooth low energy and that its Bluetooth is on and available for use.

In watchOS, tvOS, and visionOS, you can’t advertise services using a [`CBPeripheralManager`](/documentation/CoreBluetooth/CBPeripheralManager) object because support for doing so is unavailable.

## Topics

### Initializing a Peripheral Manager

[`init()`](/documentation/CoreBluetooth/CBPeripheralManager/init())

Initializes the peripheral manager without a delegate.

[`init(delegate:queue:)`](/documentation/CoreBluetooth/CBPeripheralManager/init(delegate:queue:))

Initializes the peripheral manager with a specified delegate and dispatch queue.

[`init(delegate:queue:options:)`](/documentation/CoreBluetooth/CBPeripheralManager/init(delegate:queue:options:))

Initializes the peripheral manager with a specified delegate, dispatch queue, and initialization options.

[`delegate`](/documentation/CoreBluetooth/CBPeripheralManager/delegate)

The delegate object specified to receive peripheral events.

[Peripheral Manager Initialization Options](/documentation/CoreBluetooth/peripheral-manager-initialization-options)

Keys used to specify options when creating a peripheral manager.

### Monitoring the State of a Peripheral Manager

[`authorizationStatus()`](/documentation/CoreBluetooth/CBPeripheralManager/authorizationStatus())

Returns the app’s authorization status for sharing data while in the background.

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

Values representing the current authorization state of the peripheral manager.

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

Values that represent the current state of the peripheral manager.

### Adding and Removing Services

[`add(_:)`](/documentation/CoreBluetooth/CBPeripheralManager/add(_:))

Publishes a service and any of its associated characteristics and characteristic descriptors to the local GATT database.

[`remove(_:)`](/documentation/CoreBluetooth/CBPeripheralManager/remove(_:))

Removes a specified published service from the local GATT database.

[`removeAllServices()`](/documentation/CoreBluetooth/CBPeripheralManager/removeAllServices())

Removes all published services from the local GATT database.

### Managing Advertising

[`startAdvertising(_:)`](/documentation/CoreBluetooth/CBPeripheralManager/startAdvertising(_:))

Advertises peripheral manager data.

[Advertising Data](/documentation/CoreBluetooth/advertising-data)

[`stopAdvertising()`](/documentation/CoreBluetooth/CBPeripheralManager/stopAdvertising())

Stops advertising peripheral manager data.

[`isAdvertising`](/documentation/CoreBluetooth/CBPeripheralManager/isAdvertising)

A Boolean value that indicates whether the peripheral is advertising data.

### Sending Updates of a Characteristic’s Value

[`updateValue(_:for:onSubscribedCentrals:)`](/documentation/CoreBluetooth/CBPeripheralManager/updateValue(_:for:onSubscribedCentrals:))

Send an updated characteristic value to one or more subscribed centrals, using a notification or indication.

### Responding to Read and Write Requests

[`respond(to:withResult:)`](/documentation/CoreBluetooth/CBPeripheralManager/respond(to:withResult:))

Responds to a read or write request from a connected central.

### Setting Connection Latency

[`setDesiredConnectionLatency(_:for:)`](/documentation/CoreBluetooth/CBPeripheralManager/setDesiredConnectionLatency(_:for:))

Sets the desired connection latency for an existing connection to a central device.

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

Values representing the connection latency of the peripheral manager.

### Using L2CAP Channels

[`publishL2CAPChannel(withEncryption:)`](/documentation/CoreBluetooth/CBPeripheralManager/publishL2CAPChannel(withEncryption:))

Creates a listener for incoming L2CAP channel connections.

[`unpublishL2CAPChannel(_:)`](/documentation/CoreBluetooth/CBPeripheralManager/unpublishL2CAPChannel(_:))

Removes a published service from the local system.



---

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)