Instance Method

handle(_:)

Tells the delegate that the app has received one or more background tasks.

Declaration

optional func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>)

Parameters

backgroundTasks

A set containing one or more background tasks.

Discussion

The system calls this method when your app is launched to handle a background task. Use this method to handle the specified tasks. Call each tasks’s setTaskCompleted method as soon as the task is complete. For more information on background tasks, see Background Refresh Tasks.

See Also

Monitoring State Changes

func applicationDidFinishLaunching()

Tells the delegate that the launch process is almost done and the extension is almost ready to run.

func applicationDidBecomeActive()

Tells the delegate that the Watch app is now visible and processing events.

func applicationWillResignActive()

Tells the delegate that the Watch app is about to be deactivated.

func applicationWillEnterForeground()

Tells the delegate that the app is about to transition from the background to the foreground.

func applicationDidEnterBackground()

Tells the delegate that the app has transitioned from the foreground to the background.

func deviceOrientationDidChange()

Tells the delegate that the device's orientation has changed.

Beta