Class

WKRefreshBackgroundTask

The abstract superclass for WatchKit's other background task classes.

Declaration

@interface WKRefreshBackgroundTask : NSObject

Overview

Do not 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 extension delegate’s handleBackgroundTasks: method. Use the provided background task object to identify and manage the background task.

Topics

Accessing Background Task Data

userInfo

Custom information associated with the background task.

Completing the Background Task

- setTaskCompleted

Marks the task as complete.

Deprecated
- setTaskCompletedWithSnapshot:

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

Relationships

Inherits From

See Also

Background Tasks

Running watchOS Apps in the Background

Schedule and perform background tasks from within your app.

Playing Background Audio

Enable background audio in your app to provide a seamless playback experience.

Preparing to Take Your watchOS App’s Snapshot

Use snapshot background tasks to provide a timely, accurate snapshot of your app.

WKApplicationRefreshBackgroundTask

A background task used to update your app’s state in the background.

WKURLSessionRefreshBackgroundTask

A background task that helps you respond to NSURLSession background transfers.

WKWatchConnectivityRefreshBackgroundTask

A background task used to receive background updates from the Watch Connectivity framework.

WKSnapshotRefreshBackgroundTask

A background task used to update your app’s user interface in preparation for a snapshot.

WKIntentDidRunRefreshBackgroundTask

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

WKRelevantShortcutRefreshBackgroundTask

A background task used to periodically donate relevant Siri shortcuts.

Background Session Keys

Enable background sessions.