---
title: WKRefreshBackgroundTask
framework: watchkit
role: symbol
role_heading: Class
path: watchkit/wkrefreshbackgroundtask
---

# WKRefreshBackgroundTask

The abstract superclass for WatchKit’s background task classes.

## Declaration

```swift
class WKRefreshBackgroundTask
```

## Mentioned in

Preparing to take your watchOS app’s snapshot Using background tasks

## Overview

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(_:) 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 backgroundTask(_:action:).

## Topics

### Accessing background task data

- [userInfo](watchkit/wkrefreshbackgroundtask/userinfo.md)

### Completing the background task

- [expirationHandler](watchkit/wkrefreshbackgroundtask/expirationhandler.md)
- [setTaskCompletedWithSnapshot(_:)](watchkit/wkrefreshbackgroundtask/settaskcompletedwithsnapshot(_:).md)
- [setTaskCompleted()](watchkit/wkrefreshbackgroundtask/settaskcompleted().md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [WKApplicationRefreshBackgroundTask](watchkit/wkapplicationrefreshbackgroundtask.md)
- [WKBluetoothAlertRefreshBackgroundTask](watchkit/wkbluetoothalertrefreshbackgroundtask.md)
- [WKIntentDidRunRefreshBackgroundTask](watchkit/wkintentdidrunrefreshbackgroundtask.md)
- [WKRelevantShortcutRefreshBackgroundTask](watchkit/wkrelevantshortcutrefreshbackgroundtask.md)
- [WKSnapshotRefreshBackgroundTask](watchkit/wksnapshotrefreshbackgroundtask.md)
- [WKURLSessionRefreshBackgroundTask](watchkit/wkurlsessionrefreshbackgroundtask.md)
- [WKWatchConnectivityRefreshBackgroundTask](watchkit/wkwatchconnectivityrefreshbackgroundtask.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Background tasks

- [Using background tasks](watchkit/using-background-tasks.md)
- [Preparing to take your watchOS app’s snapshot](watchkit/preparing-to-take-your-watchos-app-s-snapshot.md)
- [WKApplicationRefreshBackgroundTask](watchkit/wkapplicationrefreshbackgroundtask.md)
- [WKURLSessionRefreshBackgroundTask](watchkit/wkurlsessionrefreshbackgroundtask.md)
- [WKWatchConnectivityRefreshBackgroundTask](watchkit/wkwatchconnectivityrefreshbackgroundtask.md)
- [WKBluetoothAlertRefreshBackgroundTask](watchkit/wkbluetoothalertrefreshbackgroundtask.md)
- [WKIntentDidRunRefreshBackgroundTask](watchkit/wkintentdidrunrefreshbackgroundtask.md)
- [WKRelevantShortcutRefreshBackgroundTask](watchkit/wkrelevantshortcutrefreshbackgroundtask.md)
- [WKSnapshotRefreshBackgroundTask](watchkit/wksnapshotrefreshbackgroundtask.md)
