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

# MTLCaptureManager

An instance you use to capture Metal command data in your app.

```
class MTLCaptureManager
```

## Overview

A capture manager works with the frame capture feature to:

- Capture data about Metal commands programmatically. See <doc://com.apple.documentation/documentation/Xcode/Capturing-a-Metal-workload-programmatically>.
- Only capture commands that apply to a specific [`MTLDevice`](/documentation/Metal/MTLDevice), command queue, or [`MTLCaptureScope`](/documentation/Metal/MTLCaptureScope) instance.
- Assign a default [`MTLCaptureScope`](/documentation/Metal/MTLCaptureScope) instance for captures you create in Xcode
  by clicking the Capture GPU workload button in the debug bar, which has an icon with the Metal logo.

The Metal debugger requires you to enable GPU Frame Capture in your project settings;
see <doc://com.apple.documentation/documentation/Xcode/Capturing-a-Metal-workload-in-Xcode>.

> Important:
> The capture manager records commands within the ``doc://com.apple.metal/documentation/Metal/MTLCommandBuffer`` instance that you create and commit while the capture session is active.

For more information about Metal frame capture, see <doc://com.apple.documentation/documentation/Xcode/Metal-debugger>.

## Topics

### Obtaining the shared capture manager

[`shared()`](/documentation/Metal/MTLCaptureManager/shared())

Provides the shared capture manager for your Metal app.

### Querying support for a capture destination

[`supportsDestination(_:)`](/documentation/Metal/MTLCaptureManager/supportsDestination(_:))

Checks to see whether a particular capture destination is supported.

### Creating a capture scope

[`makeCaptureScope(device:)`](/documentation/Metal/MTLCaptureManager/makeCaptureScope(device:))

Creates a capture scope for commands submitted to a specific device object.

[`makeCaptureScope(commandQueue:)`](/documentation/Metal/MTLCaptureManager/makeCaptureScope(commandQueue:)-1rozd)

Creates a capture scope for commands submitted to a specific command queue.

[`defaultCaptureScope`](/documentation/Metal/MTLCaptureManager/defaultCaptureScope)

The capture scope to use when a capture is initiated in Xcode.

### Starting capture

Capture Metal commands for presentation in the Metal debugger.

[`startCapture(with:)`](/documentation/Metal/MTLCaptureManager/startCapture(with:))

Starts capturing any of your app’s Metal commands, with the capture session defined by a descriptor object.

[`startCapture(device:)`](/documentation/Metal/MTLCaptureManager/startCapture(device:))

Starts capturing any of your app’s Metal commands that are executed by the device object.

[`startCapture(commandQueue:)`](/documentation/Metal/MTLCaptureManager/startCapture(commandQueue:))

Starts capturing any of your app’s Metal commands that are executed by the command queue.

[`startCapture(scope:)`](/documentation/Metal/MTLCaptureManager/startCapture(scope:))

Starts capturing any of your app’s Metal commands that are in the specified capture scope.

### Stopping capture

[`stopCapture()`](/documentation/Metal/MTLCaptureManager/stopCapture())

Stops capturing Metal commands.

### Monitoring capture

[`isCapturing`](/documentation/Metal/MTLCaptureManager/isCapturing)

A Boolean value that indicates whether Metal commands are being captured.



---

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)