<!--
{
  "availability" : [
    "iOS: 10.0.0 - 27.0.0",
    "iPadOS: 10.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 11.0.0 - 27.0.0",
    "tvOS: 10.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "ReplayKit",
  "identifier" : "/documentation/ReplayKit/RPBroadcastControllerDelegate/broadcastController(_:didFinishWithError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ReplayKit"
    ],
    "preciseIdentifier" : "c:objc(pl)RPBroadcastControllerDelegate(im)broadcastController:didFinishWithError:"
  },
  "title" : "broadcastController(_:didFinishWithError:)"
}
-->

# broadcastController(_:didFinishWithError:)

Tells the delegate that a broadcast ended due to an error.

```
optional func broadcastController(_ broadcastController: RPBroadcastController, didFinishWithError error: (any Error)?)
```

## Parameters

`broadcastController`

The current controller instance.

`error`

An [`RPRecordingErrorCode`](/documentation/ReplayKit/RPRecordingErrorCode) error indicating why the broadcast finished.

## Discussion

Use the returned error to inform the user why the broadcast failed and provide an option to resume the broadcast, if applicable.

---

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)