<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVKitError-swift.struct/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:@E@AVKitError"
  },
  "title" : "AVKitError.Code"
}
-->

# AVKitError.Code

Constants that identify framework error codes.

```
enum Code
```

## Topics

### Creating an error code

[`init?(rawValue: Int)`](/documentation/AVKit/AVKitError-swift.struct/Code/init(rawValue:))

### Error codes

[`case unknown`](/documentation/AVKit/AVKitError-swift.struct/Code/unknown)

An unknown error.

[`case contentRatingUnknown`](/documentation/AVKit/AVKitError-swift.struct/Code/contentRatingUnknown)

The media content rating is missing or unrecognized.

[`case contentDisallowedByPasscode`](/documentation/AVKit/AVKitError-swift.struct/Code/contentDisallowedByPasscode)

A restriction disallows access to this content, but the user can override the restriction by entering the device passcode.

[`case pictureInPictureStartFailed`](/documentation/AVKit/AVKitError-swift.struct/Code/pictureInPictureStartFailed)

The system failed to start Picture in Picture.

[`case contentDisallowedByProfile`](/documentation/AVKit/AVKitError-swift.struct/Code/contentDisallowedByProfile)

An installed profile restricts access to this content.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Sendable`](/documentation/Swift/Sendable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)