Contents

WKWatchConnectivityRefreshBackgroundTask

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

Declaration

class WKWatchConnectivityRefreshBackgroundTask

Mentioned in

Overview

Don’t subclass or create instances of this class. Instead, when this background watch connectivity task is triggered, the system launches your app in the background, instantiates a WKWatchConnectivityRefreshBackgroundTask object, and passes the task object to your app delegate’s handle(_:) method.

Background watch connectivity tasks are triggered whenever the paired device sends data using one of the following WCSession methods:

The background watch connectivity task informs you that your app is given background time. You must use your doc://com.apple.documentation/documentation/watchconnectivity/wcsessiondelegate methods to receive this data. Because of the asynchronous nature of these tasks, defer calling your tasks’s setTaskCompleted() method until after you’ve activated your session and received all the pending data. Use the hasContentPending property to determine whether you still have any pending data.

See Also

Background tasks