<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WatchConnectivity",
  "identifier" : "/documentation/WatchConnectivity/WCSessionDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Watch Connectivity"
    ],
    "preciseIdentifier" : "c:objc(pl)WCSessionDelegate"
  },
  "title" : "WCSessionDelegate"
}
-->

# WCSessionDelegate

A delegate protocol that defines methods for receiving messages sent by a [`WCSession`](/documentation/WatchConnectivity/WCSession) object.

```
protocol WCSessionDelegate : NSObjectProtocol
```

## Overview

Session objects are used to communicate between a WatchKit extension and the companion iOS app on a paired and active iPhone. When configuring your session object, you must specify a delegate object that implements this protocol. The session calls your delegate methods to deliver incoming data from the counterpart app and to manage session-related changes.

Most methods of this protocol are optional. You implement the methods you need to respond to the data transfer operations that your apps support. However, apps must implement the [`session(_:activationDidCompleteWith:error:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:activationDidCompleteWith:error:)) method, supporting asynchronous activation. On iOS, you must also implement the [`sessionDidBecomeInactive(_:)`](/documentation/WatchConnectivity/WCSessionDelegate/sessionDidBecomeInactive(_:)) and [`sessionDidDeactivate(_:)`](/documentation/WatchConnectivity/WCSessionDelegate/sessionDidDeactivate(_:)) methods, supporting multiple Apple Watches.

The [`WCSession`](/documentation/WatchConnectivity/WCSession) object calls the methods of its delegate serially, so your method implementations do not need to be reentrant. Immediate messages can be sent only while both the WatchKit extension and iOS app are running. By contrast, context updates and file transfers can be initiated at any time and delivered in the background to the other device. All transfers are delivered in the order in which they were sent.

> Note:
> The methods of this protocol are called on a background thread of your app, so any code you write should be written with that fact in mind. In particular, if your method implementations initiate modifications to your app’s interface, make sure to redirect those modifications to your app’s main thread.

### Supporting Communication with Multiple Apple Watches

An iPhone running iOS 9.3 or later may pair with more than one Apple Watch running watchOS 2.2 or later. Implement the following methods in your session delegate:

- [`session(_:activationDidCompleteWith:error:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:activationDidCompleteWith:error:))
- [`sessionDidBecomeInactive(_:)`](/documentation/WatchConnectivity/WCSessionDelegate/sessionDidBecomeInactive(_:)) (iOS only)
- [`sessionDidDeactivate(_:)`](/documentation/WatchConnectivity/WCSessionDelegate/sessionDidDeactivate(_:)) (iOS only)

Use the activation-related methods to track the activation state of the session in your iOS app. With Auto Switch enabled on the user’s iPhone, the session automatically moves to the inactive state when the user puts on a different Apple Watch than the one that is currently active. (If Auto Switch is disabled, the user must manually select which watch is active.) While your iOS app is in the inactive state, the system finishes delivering any data that has been received before moving your app to the deactivated state. While inactive or deactivated, you cannot initiate any new transfers. When your iOS app reaches the deactivated state, call the session’s [`activate()`](/documentation/WatchConnectivity/WCSession/activate()) method again to connect to the new Apple Watch.

For more information about the flow of messages when a user switches from one Apple Watch to another, see [`WCSession`](/documentation/WatchConnectivity/WCSession).

## Topics

### Managing Session Activation

[`session(_:activationDidCompleteWith:error:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:activationDidCompleteWith:error:))

Tells the delegate that the session has finished activating.

[`sessionDidBecomeInactive(_:)`](/documentation/WatchConnectivity/WCSessionDelegate/sessionDidBecomeInactive(_:))

Tells the delegate that the session will stop communicating with the current Apple Watch.

[`sessionDidDeactivate(_:)`](/documentation/WatchConnectivity/WCSessionDelegate/sessionDidDeactivate(_:))

Tells the delegate that the session has delivered all the data from the previous session, and that communication with the Apple Watch has ended.

### Managing State Changes

[`sessionWatchStateDidChange(_:)`](/documentation/WatchConnectivity/WCSessionDelegate/sessionWatchStateDidChange(_:))

Indicates a change to the counterpart’s information.

[`sessionReachabilityDidChange(_:)`](/documentation/WatchConnectivity/WCSessionDelegate/sessionReachabilityDidChange(_:))

Indicates a change to the counterpart’s reachability status.

[`sessionCompanionAppInstalledDidChange(_:)`](/documentation/WatchConnectivity/WCSessionDelegate/sessionCompanionAppInstalledDidChange(_:))

Indicates a change to the companion app’s installed state.

### Receiving Context Data

[`session(_:didReceiveApplicationContext:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:didReceiveApplicationContext:))

Tells the delegate that the session has received context data from the counterpart.

### Receiving Immediate Messages

[`session(_:didReceiveMessage:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:didReceiveMessage:))

Tells the delegate that an immediate message has arrived.

[`session(_:didReceiveMessage:replyHandler:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:didReceiveMessage:replyHandler:))

Tells the delegate that an immediate message has arrived, and it requires a response.

[`session(_:didReceiveMessageData:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:didReceiveMessageData:))

Tells the delegate that an immediate data message has arrived.

[`session(_:didReceiveMessageData:replyHandler:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:didReceiveMessageData:replyHandler:))

Tells the delegate that an immediate data message has arrived, and it requires a response.

### Managing Data Dictionary Transfers

[`session(_:didReceiveUserInfo:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:didReceiveUserInfo:))

Tells the delegate that the session successfully received a data directory from its counterpart.

[`session(_:didFinish:error:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:didFinish:error:)-8627b)

Tells the delegate that a data transfer operation has finished successfully or ended because of an error.

### Managing File Transfers

[`session(_:didReceive:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:didReceive:))

Tells the delegate that the session successfully received a file from its counterpart.

[`session(_:didFinish:error:)`](/documentation/WatchConnectivity/WCSessionDelegate/session(_:didFinish:error:)-6dtcu)

Tells the delegate that a file transfer has finished successfully or ended because of an error.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)