<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaDevice",
  "identifier" : "/documentation/MediaDevice/MediaOutputDevice/AuthorizationMethod/CodeLength",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Media Device"
    ],
    "preciseIdentifier" : "s:11MediaDevice0a6OutputB0V19AuthorizationMethodV10CodeLengthV"
  },
  "title" : "MediaOutputDevice.AuthorizationMethod.CodeLength"
}
-->

# MediaOutputDevice.AuthorizationMethod.CodeLength

Represents the valid lengths for an authorization code.

```
struct CodeLength
```

## Overview

Use one of the provided static properties to specify the length
of an authorization code.

## Topics

### Type Properties

[`static let fourCharacter: MediaOutputDevice.AuthorizationMethod.CodeLength`](/documentation/MediaDevice/MediaOutputDevice/AuthorizationMethod/CodeLength/fourCharacter)

A 4-character code.

[`static let sixCharacter: MediaOutputDevice.AuthorizationMethod.CodeLength`](/documentation/MediaDevice/MediaOutputDevice/AuthorizationMethod/CodeLength/sixCharacter)

A 6-character code.

## Relationships

### Conforms To

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

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

[`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)