Contents

WKExtensionDelegate

A collection of methods that manages the app-level behavior of a WatchKit extension.

Declaration

@MainActor protocol WKExtensionDelegate : NSObjectProtocol

Overview

Implement the delegate’s methods to respond to your app’s life-cycle events, such as the activation and deactivation of your app. You can also implement delegate methods to respond to background tasks, Siri intents, workout sessions, or Handoff activity from another devices.

WatchKit creates your delegate object automatically by instantiating the class assigned to the WKExtensionDelegateClassName key in your WatchKit extension’s Info.plist file. By default, this class is named ExtensionDelegate. The system then assigns the delegate object to the delegate property of the shared WKExtension object.

Topics

Monitoring state changes

Responding to intents

Setup Now Playing interface

Handling a workout session

Handling background tasks

Handling extended runtime sessions

Managing remote notifications

Coordinating handoff activity

Accepting CloudKit shares

Deprecated Methods

See Also

App structure