Class

WKRelevantShortcutRefreshBackgroundTask

A background task used to periodically donate relevant Siri shortcuts.

Declaration

@interface WKRelevantShortcutRefreshBackgroundTask : WKRefreshBackgroundTask

Overview

Relevant shortcut refresh tasks provide background execution time for your app to update its relevant shortcuts. This task lets your app provide up-to-date, glanceable data, without requiring the user to tap the shortcut or launch your app. Use this task to check if your data has been updated. If it has, supply new relevant shortcuts as needed.

Do not subclass or create instances of this class. Instead, the system instantiates a WKRelevantShortcutRefreshBackgroundTask object, and passes the task object to your extension delegate’s handleBackgroundTasks: method. The system automatically schedules relevant shortcut refresh tasks based on the user’s engagement with your app’s shortcuts. The more the user glances at or interacts with the shortcuts, the more often the system gives your app a relevant shortcut refresh task.

Relationships

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.

WKRefreshBackgroundTask

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

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.

Background Session Keys

Enable background sessions.