<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLBinaryArchive",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLBinaryArchive"
  },
  "title" : "MTLBinaryArchive"
}
-->

# MTLBinaryArchive

A container for pipeline state descriptors and their associated compiled shader code.

```
protocol MTLBinaryArchive : NSObjectProtocol
```

## Topics

### Identifying the archive

[`device`](/documentation/Metal/MTLBinaryArchive/device)

The Metal device object that created the binary archive.

[`label`](/documentation/Metal/MTLBinaryArchive/label)

A string that identifies the library.

### Adding pipeline descriptors

[`addComputePipelineFunctions(descriptor:)`](/documentation/Metal/MTLBinaryArchive/addComputePipelineFunctions(descriptor:))

Adds a description of a compute pipeline to the archive.

[`addRenderPipelineFunctions(descriptor:)`](/documentation/Metal/MTLBinaryArchive/addRenderPipelineFunctions(descriptor:))

Adds a description of a render pipeline to the archive.

[`addTileRenderPipelineFunctions(descriptor:)`](/documentation/Metal/MTLBinaryArchive/addTileRenderPipelineFunctions(descriptor:))

Adds a description of a tile renderer pipeline to the archive.

[`addFunction(descriptor:library:)`](/documentation/Metal/MTLBinaryArchive/addFunction(descriptor:library:))

Adds a description of a function to the archive.

### Serializing archives

[`serialize(to:)`](/documentation/Metal/MTLBinaryArchive/serialize(to:))

Writes the contents of the archive to a file.



---

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)