<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaDevice",
  "identifier" : "/documentation/MediaDevice/MediaDeviceExtension/protocolType",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Media Device"
    ],
    "preciseIdentifier" : "s:11MediaDevice0aB9ExtensionP12protocolType07UniformE11Identifiers6UTTypeVvp"
  },
  "title" : "protocolType"
}
-->

# protocolType

The communication protocol that this extension implements.

```
@MainActor var protocolType: UTType { get }
```

## Declaring the Protocol Type

Declare a custom Uniform Type Identifier in your extension’s Info.plist using
`UTExportedTypeDeclarations`. The type must conform to `public.media-sharing-protocol`:

```xml
<key>UTExportedTypeDeclarations</key>
<array>
    <dict>
        <key>UTTypeIdentifier</key>
        <string>com.example.sharingprotocol</string>
        <key>UTTypeDescription</key>
        <string>My Sharing Protocol</string>
        <key>UTTypeConformsTo</key>
        <array>
            <string>public.media-sharing-protocol</string>
        </array>
        <key>UTTypeIcons</key>
		<dict>
			<key>UTTypeSymbolName</key>
			<string>sharingprotocol.logo</string>
		</dict>
    </dict>
</array>
```

- `UTTypeIdentifier`: A reverse-DNS string that uniquely identifies your protocol. Media
  apps receive this value through `AVSystemRoute/protocolType` and use it to determine
  which protocol is active.
- `UTTypeDescription`: A human-readable name for the protocol. The system may display this
  in user interfaces such as the route picker.
- `UTTypeConformsTo`: Must include `public.media-sharing-protocol`.

## Returning the Type

Return a `UTType` whose identifier matches the `UTTypeIdentifier` declared in Info.plist:

```swift
var protocolType: UTType {
    UTType("com.example.sharingprotocol")!
}
```

---

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)