---
title: WKExtensionDelegate
framework: watchkit
role: symbol
role_heading: Protocol
path: watchkit/wkextensiondelegate
---

# WKExtensionDelegate

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

## Declaration

```swift
@MainActor protocol WKExtensionDelegate : NSObjectProtocol
```

## Overview

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

- [Working with the watchOS app life cycle](watchkit/working-with-the-watchos-app-life-cycle.md)
- [applicationDidFinishLaunching()](watchkit/wkextensiondelegate/applicationdidfinishlaunching().md)
- [applicationDidBecomeActive()](watchkit/wkextensiondelegate/applicationdidbecomeactive().md)
- [applicationWillResignActive()](watchkit/wkextensiondelegate/applicationwillresignactive().md)
- [applicationWillEnterForeground()](watchkit/wkextensiondelegate/applicationwillenterforeground().md)
- [applicationDidEnterBackground()](watchkit/wkextensiondelegate/applicationdidenterbackground().md)
- [deviceOrientationDidChange()](watchkit/wkextensiondelegate/deviceorientationdidchange().md)

### Responding to intents

- [handle(_:completionHandler:)](watchkit/wkextensiondelegate/handle(_:completionhandler:).md)

### Setup Now Playing interface

- [handleRemoteNowPlayingActivity()](watchkit/wkextensiondelegate/handleremotenowplayingactivity().md)

### Handling a workout session

- [handle(_:)](watchkit/wkextensiondelegate/handle(_:)-f27i.md)
- [handleActiveWorkoutRecovery()](watchkit/wkextensiondelegate/handleactiveworkoutrecovery().md)

### Handling background tasks

- [handle(_:)](watchkit/wkextensiondelegate/handle(_:)-92ulv.md)

### Handling extended runtime sessions

- [handle(_:)](watchkit/wkextensiondelegate/handle(_:)-4qxgv.md)

### Managing remote notifications

- [didRegisterForRemoteNotifications(withDeviceToken:)](watchkit/wkextensiondelegate/didregisterforremotenotifications(withdevicetoken:).md)
- [didFailToRegisterForRemoteNotificationsWithError(_:)](watchkit/wkextensiondelegate/didfailtoregisterforremotenotificationswitherror(_:).md)
- [didReceiveRemoteNotification(_:fetchCompletionHandler:)](watchkit/wkextensiondelegate/didreceiveremotenotification(_:fetchcompletionhandler:).md)
- [WKBackgroundFetchResult](watchkit/wkbackgroundfetchresult.md)

### Coordinating handoff activity

- [handleUserActivity(_:)](watchkit/wkextensiondelegate/handleuseractivity(_:).md)
- [handle(_:)](watchkit/wkextensiondelegate/handle(_:)-5pyj1.md)

### Accepting CloudKit shares

- [userDidAcceptCloudKitShare(with:)](watchkit/wkextensiondelegate/userdidacceptcloudkitshare(with:).md)

### Deprecated Methods

- [didReceiveRemoteNotification(_:)](watchkit/wkextensiondelegate/didreceiveremotenotification(_:).md)
- [didReceive(_:)](watchkit/wkextensiondelegate/didreceive(_:).md)
- [handleAction(withIdentifier:forRemoteNotification:)](watchkit/wkextensiondelegate/handleaction(withidentifier:forremotenotification:).md)
- [handleAction(withIdentifier:forRemoteNotification:withResponseInfo:)](watchkit/wkextensiondelegate/handleaction(withidentifier:forremotenotification:withresponseinfo:).md)
- [handleAction(withIdentifier:for:)](watchkit/wkextensiondelegate/handleaction(withidentifier:for:).md)
- [handleAction(withIdentifier:for:withResponseInfo:)](watchkit/wkextensiondelegate/handleaction(withidentifier:for:withresponseinfo:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### App structure

- [Setting up a watchOS project](watchos-apps/setting-up-a-watchos-project.md)
- [WKApplication](watchkit/wkapplication.md)
- [WKApplicationDelegate](watchkit/wkapplicationdelegate.md)
- [WKExtension](watchkit/wkextension.md)
- [WKApplicationMain(_:_:_:)](watchkit/wkapplicationmain(_:_:_:).md)
- [WKInterfaceDevice](watchkit/wkinterfacedevice.md)
- [WKPrefersNetworkUponForeground](bundleresources/information-property-list/wkprefersnetworkuponforeground.md)
