<!--
{
  "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/CBPeripheralManagerDelegate/peripheralManagerDidStartAdvertising(_:error:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Bluetooth"
    ],
    "preciseIdentifier" : "c:objc(pl)CBPeripheralManagerDelegate(im)peripheralManagerDidStartAdvertising:error:"
  },
  "title" : "peripheralManagerDidStartAdvertising(_:error:)"
}
-->

# peripheralManagerDidStartAdvertising(_:error:)

Tells the delegate the peripheral manager started advertising the local peripheral device’s data.

```
optional func peripheralManagerDidStartAdvertising(_ peripheral: CBPeripheralManager, error: (any Error)?)
```

## Parameters

`peripheral`

The peripheral manager that is starting advertising.

`error`

The reason the call failed, or `nil` if no error occurred.

## Discussion

Core Bluetooth calls this method when your app calls the [`startAdvertising(_:)`](/documentation/CoreBluetooth/CBPeripheralManager/startAdvertising(_:)) method to advertise the local peripheral device’s data. If successful, the `error` parameter is `nil`. If a problem prevents advertising the data, the `error` parameter returns the cause of the failure.

---

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)