Contents

WKApplicationRefreshBackgroundTask

A task that updates your app’s state in the background.

Declaration

class WKApplicationRefreshBackgroundTask

Mentioned in

Overview

Don’t subclass or create instances of this class. Instead, schedule a background app refresh task by calling scheduleBackgroundRefresh(withPreferredDate:userInfo:scheduledCompletion:). When the system triggers the background task, it launches your app in the background, instantiates a WKApplicationRefreshBackgroundTask object, and passes the task object to your app delegate’s handle(_:) method.

The system budgets the number of background refresh tasks available to an app. In general, the system performs approximately four tasks per hour for each app with a complication on the active watch face. All the complications on the current watch face share this budget. After you exhaust the budget, the system delays your requests until more time becomes available.

See Also

Background tasks