<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 18.2.0 -",
    "macOS: 12.3.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScreenCaptureKit",
  "identifier" : "/documentation/ScreenCaptureKit/SCStreamError/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "ScreenCaptureKit"
    ],
    "preciseIdentifier" : "c:@E@SCStreamErrorCode"
  },
  "title" : "SCStreamError.Code"
}
-->

# SCStreamError.Code

Codes for user cancellation events and errors that can occur in ScreenCaptureKit.

```
enum Code
```

## Topics

### User cancellation

[`SCStreamError.Code.userStopped`](/documentation/ScreenCaptureKit/SCStreamError/Code/userStopped)

An error message that indicates the user stopped the stream.

### Privacy and entitlements

[`SCStreamError.Code.userDeclined`](/documentation/ScreenCaptureKit/SCStreamError/Code/userDeclined)

An error message that indicates the user didn’t grant Screen Recording permission to your app.

[`SCStreamError.Code.missingEntitlements`](/documentation/ScreenCaptureKit/SCStreamError/Code/missingEntitlements)

An error message that indicates missing entitlements in your app.

### Stream management

[`SCStreamError.Code.attemptToStartStreamState`](/documentation/ScreenCaptureKit/SCStreamError/Code/attemptToStartStreamState)

An error message that indicates a stream is already running or doesn’t exist when trying to start a stream.

[`SCStreamError.Code.attemptToStopStreamState`](/documentation/ScreenCaptureKit/SCStreamError/Code/attemptToStopStreamState)

An error message that indicates a stream is already stopped or doesn’t exist when trying to stop a stream.

[`SCStreamError.Code.attemptToUpdateFilterState`](/documentation/ScreenCaptureKit/SCStreamError/Code/attemptToUpdateFilterState)

An error message that indicates a stream couldn’t update its content filter.

[`SCStreamError.Code.attemptToConfigState`](/documentation/ScreenCaptureKit/SCStreamError/Code/attemptToConfigState)

An error message that indicates a stream couldn’t update its configuration.

[`SCStreamError.Code.failedToStart`](/documentation/ScreenCaptureKit/SCStreamError/Code/failedToStart)

An error message that indicates a stream failed to start.

[`SCStreamError.Code.removingStream`](/documentation/ScreenCaptureKit/SCStreamError/Code/removingStream)

An error message that indicates a stream wasn’t removed.

[`SCStreamError.Code.failedToStartAudioCapture`](/documentation/ScreenCaptureKit/SCStreamError/Code/failedToStartAudioCapture)

An error message that indicates an audio stream failed to start.

[`SCStreamError.Code.failedToStopAudioCapture`](/documentation/ScreenCaptureKit/SCStreamError/Code/failedToStopAudioCapture)

An error message that indicates an audio stream failed to stop.

[`SCStreamError.Code.failedToStartMicrophoneCapture`](/documentation/ScreenCaptureKit/SCStreamError/Code/failedToStartMicrophoneCapture)

An error message that indicates microphone capture failed to start.

[`SCStreamError.Code.systemStoppedStream`](/documentation/ScreenCaptureKit/SCStreamError/Code/systemStoppedStream)

An error message that indicates the system stopped the stream.

[`SCStreamError.Code.internalError`](/documentation/ScreenCaptureKit/SCStreamError/Code/internalError)

An error message that indicates a stream can’t start due to a failure in ScreenCaptureKit’s internals.

### Shareable content

[`SCStreamError.Code.noCaptureSource`](/documentation/ScreenCaptureKit/SCStreamError/Code/noCaptureSource)

An error message that indicates a stream doesn’t have a source to capture.

[`SCStreamError.Code.noDisplayList`](/documentation/ScreenCaptureKit/SCStreamError/Code/noDisplayList)

An error message that indicates a stream doesn’t have displays available.

[`SCStreamError.Code.noWindowList`](/documentation/ScreenCaptureKit/SCStreamError/Code/noWindowList)

An error message that indicates a stream doesn’t have windows available.

[`SCStreamError.Code.failedApplicationConnectionInvalid`](/documentation/ScreenCaptureKit/SCStreamError/Code/failedApplicationConnectionInvalid)

An error message that indicates the stream lost its connection to an app.

[`SCStreamError.Code.failedApplicationConnectionInterrupted`](/documentation/ScreenCaptureKit/SCStreamError/Code/failedApplicationConnectionInterrupted)

An error message that indicates there was an interruption in a connection to an app.

[`SCStreamError.Code.failedNoMatchingApplicationContext`](/documentation/ScreenCaptureKit/SCStreamError/Code/failedNoMatchingApplicationContext)

An error message that indicates there isn’t a matching app context for streaming.

### Invalid parameters

[`SCStreamError.Code.invalidParameter`](/documentation/ScreenCaptureKit/SCStreamError/Code/invalidParameter)

An error message that indicates an operation failed because of an invalid parameter value.

### Creating an error

[`init(rawValue:)`](/documentation/ScreenCaptureKit/SCStreamError/Code/init(rawValue:))



---

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)