<!--
{
  "availability" : [
    "iOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AccessoryTransportExtension",
  "identifier" : "/documentation/AccessoryTransportExtension/AccessoryGPUWorker",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Accessory Transport Extension"
    ],
    "preciseIdentifier" : "s:27AccessoryTransportExtension0A9GPUWorkerV"
  },
  "title" : "AccessoryGPUWorker"
}
-->

# AccessoryGPUWorker

A feature for GPU work that carries data between your data provider and transport extensions.

```
struct AccessoryGPUWorker
```

## Overview

An *accessory GPU worker* exchanges information in the background like [`AccessoryWorker`](/documentation/AccessoryTransportExtension/AccessoryWorker) does, but runs under a more permissive sandbox profile that permits GPU access. Create an instance of this structure in the `extensionPoint` of your [`AccessoryDataProvider`](/documentation/AccessoryTransportExtension/AccessoryDataProvider) extension, and open sessions from your transport extension with [`makeFeatureSession(_:)`](/documentation/AccessoryTransportExtension/AccessoryTransportSession/makeFeatureSession(_:)) in response to events from your accessory. Your app defines the data format, and the Accessory Transport Extension framework treats the data as opaque, with no additional encryption. Enroll the feature for each accessory with `requestAuthorization(for:)`. For more information, see [Sending data to an accessory in the background](/documentation/AccessoryTransportExtension/sending-data-to-an-accessory-in-the-background).

## Perform GPU work in the background

To perform work that requires the GPU in the background, you can use <doc://com.apple.documentation/documentation/Metal>, <doc://com.apple.documentation/documentation/MetalPerformanceShaders>, <doc://com.apple.documentation/documentation/CoreML> inference on the GPU or Neural Engine, and direct GPU memory access through Metal buffers (<doc://com.apple.documentation/documentation/Metal/MTLBuffer>).

## Run a worker with scheduling and thermal limits

Use the GPU worker only when your accessory genuinely needs it. The system launches your GPU worker extension and keeps it running for as long as your accessory requires background GPU work for the accessory’s functionality. Because background work takes a lower priority than what’s running in the foreground, the system runs it at a background quality-of-service (QoS) level rather than real-time priority.

Build your extension to tolerate system pauses or session stops under thermal pressure so you can react to the unpredictable nature of background work.

## Topics

### Handling data-provider sessions

[`typealias Handler`](/documentation/AccessoryTransportExtension/AccessoryGPUWorker/Handler)

A handler type for the session’s data provider.

[`class Session`](/documentation/AccessoryTransportExtension/AccessoryGPUWorker/Session)

A class that represents the data provider within a session.

### Handling transport-extension sessions

[`class FeatureSession`](/documentation/AccessoryTransportExtension/AccessoryGPUWorker/FeatureSession)

A class that represents the session’s transport extension.

### Checking authorization

[`enum AccessoryFeatureAuthorizationStatus`](/documentation/AccessoryTransportExtension/AccessoryFeatureAuthorizationStatus)

A status that describes whether the system authorizes a feature for an accessory.

### Identifying the feature

### Creating the feature

[`init(() -> any AccessoryFeatureSessionHandler<AccessoryGPUWorker.Session>)`](/documentation/AccessoryTransportExtension/AccessoryGPUWorker/init(_:))

Initializes a GPU worker feature with a handler factory.

## Relationships

### Conforms To

[`Capability`](/documentation/ExtensionFoundation/AppExtensionPoint/Capability)

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

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

[`AccessoryFeatureAuthorizing`](/documentation/AccessoryTransportExtension/AccessoryFeatureAuthorizing)

[`AccessoryFeature`](/documentation/AccessoryTransportExtension/AccessoryFeature)

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

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

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

---

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)