<!--
{
  "availability" : [
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WatchKit",
  "identifier" : "/documentation/WatchKit/WKRefreshBackgroundTask",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "WatchKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKRefreshBackgroundTask"
  },
  "title" : "WKRefreshBackgroundTask"
}
-->

# WKRefreshBackgroundTask

The abstract superclass for WatchKit’s background task classes.

```
class WKRefreshBackgroundTask
```

## Overview

Don’t subclass or create instances of this class. The system automatically creates an appropriate background task object whenever it triggers a background task. This object is passed to your app delegate’s [`handle(_:)`](/documentation/WatchKit/WKApplicationDelegate/handle(_:)-4vdjo) method. Use the provided background task object to identify and manage the background task.

> Note:
> In watchOS 9 and later, SwiftUI Background tasks are the preferred way to handle background tasks and interactions. For more information, see <doc://com.apple.documentation/documentation/SwiftUI/Scene/backgroundTask(_:action:)>.

## Topics

### Accessing background task data

[`userInfo`](/documentation/WatchKit/WKRefreshBackgroundTask/userInfo)

Custom information associated with the background task.

### Completing the background task

[`expirationHandler`](/documentation/WatchKit/WKRefreshBackgroundTask/expirationHandler)

A block that the system calls when the available runtime for a background task is about to expire.

[`setTaskCompletedWithSnapshot(_:)`](/documentation/WatchKit/WKRefreshBackgroundTask/setTaskCompletedWithSnapshot(_:))

Marks the task as complete and indicates whether the system should take a new snapshot of the app.

[`setTaskCompleted()`](/documentation/WatchKit/WKRefreshBackgroundTask/setTaskCompleted())

Marks the task as complete.



---

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)