---
title: WKIntentDidRunRefreshBackgroundTask
framework: watchkit
role: symbol
role_heading: Class
path: watchkit/wkintentdidrunrefreshbackgroundtask
---

# WKIntentDidRunRefreshBackgroundTask

A background task used to update your app after a SiriKit intent runs.

## Declaration

```swift
class WKIntentDidRunRefreshBackgroundTask
```

## Mentioned in

Using background tasks

## Overview

Overview Intent-based shortcuts can update your app’s state; however, the intent executes in a separate process from your WatchKit extension. To update the app, the system schedules this task whenever one of your intents finishes executing. Use this task to check for any updates to your app’s state, and to make sure its visible interfaces are current. For example, you can update all of your app’s snapshot, complications, and relevant shortcuts. Don’t subclass or create instances of this class. Instead, the system instantiates a WKIntentDidRunRefreshBackgroundTask object and passes the task object to your app delegate’s handle(_:) method. note: In watchOS 9 and later, SwiftUI Background tasks are the preferred way to handle background tasks and interactions. For more information, backgroundTask(_:action:).

## Relationships

### Inherits From

- [WKRefreshBackgroundTask](watchkit/wkrefreshbackgroundtask.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)
- [WKRelevantShortcutRefreshBackgroundTask](watchkit/wkrelevantshortcutrefreshbackgroundtask.md)
- [WKSnapshotRefreshBackgroundTask](watchkit/wksnapshotrefreshbackgroundtask.md)
- [WKRefreshBackgroundTask](watchkit/wkrefreshbackgroundtask.md)
