---
title: AVError.Code
framework: AVFoundation
role: symbol
role_heading: Enumeration
path: avfoundation/averror-swift.struct/code
---

# AVError.Code

An enumeration that defines the errors that framework operations can generate.

## Declaration

```swift
enum Code
```

## Topics

### Error codes

- [AVError.Code.airPlayControllerRequiresInternet](avfoundation/averror-swift.struct/code/airplaycontrollerrequiresinternet.md)
- [AVError.Code.airPlayReceiverRequiresInternet](avfoundation/averror-swift.struct/code/airplayreceiverrequiresinternet.md)
- [AVError.Code.airPlayReceiverTemporarilyUnavailable](avfoundation/averror-swift.struct/code/airplayreceivertemporarilyunavailable.md)
- [AVError.Code.applicationIsNotAuthorized](avfoundation/averror-swift.struct/code/applicationisnotauthorized.md)
- [AVError.Code.applicationIsNotAuthorizedToUseDevice](avfoundation/averror-swift.struct/code/applicationisnotauthorizedtousedevice.md)
- [AVError.Code.autoWhiteBalanceNotLocked](avfoundation/averror-swift.struct/code/autowhitebalancenotlocked.md)
- [AVError.Code.compositionTrackSegmentsNotContiguous](avfoundation/averror-swift.struct/code/compositiontracksegmentsnotcontiguous.md)
- [AVError.Code.contentIsNotAuthorized](avfoundation/averror-swift.struct/code/contentisnotauthorized.md)
- [AVError.Code.contentIsProtected](avfoundation/averror-swift.struct/code/contentisprotected.md)
- [AVError.Code.contentIsUnavailable](avfoundation/averror-swift.struct/code/contentisunavailable.md)
- [AVError.Code.contentKeyRequestCancelled](avfoundation/averror-swift.struct/code/contentkeyrequestcancelled.md)
- [AVError.Code.contentNotUpdated](avfoundation/averror-swift.struct/code/contentnotupdated.md)
- [AVError.Code.createContentKeyRequestFailed](avfoundation/averror-swift.struct/code/createcontentkeyrequestfailed.md)
- [AVError.Code.decodeFailed](avfoundation/averror-swift.struct/code/decodefailed.md)
- [AVError.Code.decoderNotFound](avfoundation/averror-swift.struct/code/decodernotfound.md)
- [AVError.Code.decoderTemporarilyUnavailable](avfoundation/averror-swift.struct/code/decodertemporarilyunavailable.md)
- [AVError.Code.deviceAlreadyUsedByAnotherSession](avfoundation/averror-swift.struct/code/devicealreadyusedbyanothersession.md)
- [AVError.Code.deviceInUseByAnotherApplication](avfoundation/averror-swift.struct/code/deviceinusebyanotherapplication.md)
- [AVError.Code.deviceIsNotAvailableInBackground](avfoundation/averror-swift.struct/code/deviceisnotavailableinbackground.md)
- [AVError.Code.deviceLockedForConfigurationByAnotherProcess](avfoundation/averror-swift.struct/code/devicelockedforconfigurationbyanotherprocess.md)
- [AVError.Code.deviceNotConnected](avfoundation/averror-swift.struct/code/devicenotconnected.md)
- [AVError.Code.deviceWasDisconnected](avfoundation/averror-swift.struct/code/devicewasdisconnected.md)
- [AVError.Code.diskFull](avfoundation/averror-swift.struct/code/diskfull.md)
- [AVError.Code.displayWasDisabled](avfoundation/averror-swift.struct/code/displaywasdisabled.md)
- [AVError.Code.encodeFailed](avfoundation/averror-swift.struct/code/encodefailed.md)
- [AVError.Code.encoderNotFound](avfoundation/averror-swift.struct/code/encodernotfound.md)
- [AVError.Code.encoderTemporarilyUnavailable](avfoundation/averror-swift.struct/code/encodertemporarilyunavailable.md)
- [AVError.Code.exportFailed](avfoundation/averror-swift.struct/code/exportfailed.md)
- [AVError.Code.externalPlaybackNotSupportedForAsset](avfoundation/averror-swift.struct/code/externalplaybacknotsupportedforasset.md)
- [AVError.Code.failedToLoadMediaData](avfoundation/averror-swift.struct/code/failedtoloadmediadata.md)
- [AVError.Code.failedToLoadSampleData](avfoundation/averror-swift.struct/code/failedtoloadsampledata.md)
- [AVError.Code.failedToParse](avfoundation/averror-swift.struct/code/failedtoparse.md)
- [AVError.Code.fileAlreadyExists](avfoundation/averror-swift.struct/code/filealreadyexists.md)
- [AVError.Code.fileFailedToParse](avfoundation/averror-swift.struct/code/filefailedtoparse.md)
- [AVError.Code.fileFormatNotRecognized](avfoundation/averror-swift.struct/code/fileformatnotrecognized.md)
- [AVError.Code.fileTypeDoesNotSupportSampleReferences](avfoundation/averror-swift.struct/code/filetypedoesnotsupportsamplereferences.md)
- [AVError.Code.followExternalSyncDeviceTimedOut](avfoundation/averror-swift.struct/code/followexternalsyncdevicetimedout.md)
- [AVError.Code.formatUnsupported](avfoundation/averror-swift.struct/code/formatunsupported.md)
- [AVError.Code.incompatibleAsset](avfoundation/averror-swift.struct/code/incompatibleasset.md)
- [AVError.Code.incorrectlyConfigured](avfoundation/averror-swift.struct/code/incorrectlyconfigured.md)
- [AVError.Code.invalidCompositionTrackSegmentDuration](avfoundation/averror-swift.struct/code/invalidcompositiontracksegmentduration.md)
- [AVError.Code.invalidCompositionTrackSegmentSourceDuration](avfoundation/averror-swift.struct/code/invalidcompositiontracksegmentsourceduration.md)
- [AVError.Code.invalidCompositionTrackSegmentSourceStartTime](avfoundation/averror-swift.struct/code/invalidcompositiontracksegmentsourcestarttime.md)
- [AVError.Code.invalidOutputURLPathExtension](avfoundation/averror-swift.struct/code/invalidoutputurlpathextension.md)
- [AVError.Code.invalidSampleCursor](avfoundation/averror-swift.struct/code/invalidsamplecursor.md)
- [AVError.Code.invalidSourceMedia](avfoundation/averror-swift.struct/code/invalidsourcemedia.md)
- [AVError.Code.invalidVideoComposition](avfoundation/averror-swift.struct/code/invalidvideocomposition.md)
- [AVError.Code.malformedDepth](avfoundation/averror-swift.struct/code/malformeddepth.md)
- [AVError.Code.maximumDurationReached](avfoundation/averror-swift.struct/code/maximumdurationreached.md)
- [AVError.Code.maximumFileSizeReached](avfoundation/averror-swift.struct/code/maximumfilesizereached.md)
- [AVError.Code.maximumNumberOfSamplesForFileFormatReached](avfoundation/averror-swift.struct/code/maximumnumberofsamplesforfileformatreached.md)
- [AVError.Code.maximumStillImageCaptureRequestsExceeded](avfoundation/averror-swift.struct/code/maximumstillimagecapturerequestsexceeded.md)
- [AVError.Code.mediaChanged](avfoundation/averror-swift.struct/code/mediachanged.md)
- [AVError.Code.mediaDiscontinuity](avfoundation/averror-swift.struct/code/mediadiscontinuity.md)
- [AVError.Code.mediaExtensionConflict](avfoundation/averror-swift.struct/code/mediaextensionconflict.md)
- [AVError.Code.mediaExtensionDisabled](avfoundation/averror-swift.struct/code/mediaextensiondisabled.md)
- [AVError.Code.mediaServicesWereReset](avfoundation/averror-swift.struct/code/mediaserviceswerereset.md)
- [AVError.Code.noCompatibleAlternatesForExternalDisplay](avfoundation/averror-swift.struct/code/nocompatiblealternatesforexternaldisplay.md)
- [AVError.Code.noDataCaptured](avfoundation/averror-swift.struct/code/nodatacaptured.md)
- [AVError.Code.noImageAtTime](avfoundation/averror-swift.struct/code/noimageattime.md)
- [AVError.Code.noLongerPlayable](avfoundation/averror-swift.struct/code/nolongerplayable.md)
- [AVError.Code.noSmartFramingsEnabled](avfoundation/averror-swift.struct/code/nosmartframingsenabled.md)
- [AVError.Code.noSourceTrack](avfoundation/averror-swift.struct/code/nosourcetrack.md)
- [AVError.Code.operationCancelled](avfoundation/averror-swift.struct/code/operationcancelled.md)
- [AVError.Code.operationInterrupted](avfoundation/averror-swift.struct/code/operationinterrupted.md)
- [AVError.Code.operationNotAllowed](avfoundation/averror-swift.struct/code/operationnotallowed.md)
- [AVError.Code.operationNotSupportedForAsset](avfoundation/averror-swift.struct/code/operationnotsupportedforasset.md)
- [AVError.Code.operationNotSupportedForPreset](avfoundation/averror-swift.struct/code/operationnotsupportedforpreset.md)
- [AVError.Code.outOfMemory](avfoundation/averror-swift.struct/code/outofmemory.md)
- [AVError.Code.recordingAlreadyInProgress](avfoundation/averror-swift.struct/code/recordingalreadyinprogress.md)
- [AVError.Code.referenceForbiddenByReferencePolicy](avfoundation/averror-swift.struct/code/referenceforbiddenbyreferencepolicy.md)
- [AVError.Code.rosettaNotInstalled](avfoundation/averror-swift.struct/code/rosettanotinstalled.md)
- [AVError.Code.sandboxExtensionDenied](avfoundation/averror-swift.struct/code/sandboxextensiondenied.md)
- [AVError.Code.screenCaptureFailed](avfoundation/averror-swift.struct/code/screencapturefailed.md)
- [AVError.Code.segmentStartedWithNonSyncSample](avfoundation/averror-swift.struct/code/segmentstartedwithnonsyncsample.md)
- [AVError.Code.serverIncorrectlyConfigured](avfoundation/averror-swift.struct/code/serverincorrectlyconfigured.md)
- [AVError.Code.sessionConfigurationChanged](avfoundation/averror-swift.struct/code/sessionconfigurationchanged.md)
- [AVError.Code.sessionHardwareCostOverage](avfoundation/averror-swift.struct/code/sessionhardwarecostoverage.md)
- [AVError.Code.sessionNotRunning](avfoundation/averror-swift.struct/code/sessionnotrunning.md)
- [AVError.Code.sessionWasInterrupted](avfoundation/averror-swift.struct/code/sessionwasinterrupted.md)
- [AVError.Code.toneMappingFailed](avfoundation/averror-swift.struct/code/tonemappingfailed.md)
- [AVError.Code.torchLevelUnavailable](avfoundation/averror-swift.struct/code/torchlevelunavailable.md)
- [AVError.Code.undecodableMediaData](avfoundation/averror-swift.struct/code/undecodablemediadata.md)
- [AVError.Code.unknown](avfoundation/averror-swift.struct/code/unknown.md)
- [AVError.Code.unsupportedDeviceActiveFormat](avfoundation/averror-swift.struct/code/unsupporteddeviceactiveformat.md)
- [AVError.Code.unsupportedOutputSettings](avfoundation/averror-swift.struct/code/unsupportedoutputsettings.md)
- [AVError.Code.videoCompositorFailed](avfoundation/averror-swift.struct/code/videocompositorfailed.md)

### Enumeration Cases

- [AVError.Code.externalSyncDeviceFrequencyHigherThanSpecified](avfoundation/averror-swift.struct/code/externalsyncdevicefrequencyhigherthanspecified.md)
- [AVError.Code.externalSyncDeviceFrequencyLowerThanSpecified](avfoundation/averror-swift.struct/code/externalsyncdevicefrequencylowerthanspecified.md)
- [AVError.Code.followExternalSyncFailed](avfoundation/averror-swift.struct/code/followexternalsyncfailed.md)
- [AVError.Code.notEnoughSpaceForProVideoStorageReplenishment](avfoundation/averror-swift.struct/code/notenoughspaceforprovideostoragereplenishment.md)

### Initializers

- [init(rawValue:)](avfoundation/averror-swift.struct/code/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
