<!--
{
  "availability" : [
    "iOS: 7.0.0 - 27.0.0",
    "iPadOS: 7.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.10.0 - 27.0.0",
    "tvOS: 10.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "MultipeerConnectivity",
  "identifier" : "/documentation/MultipeerConnectivity/MCSessionDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Multipeer Connectivity"
    ],
    "preciseIdentifier" : "c:objc(pl)MCSessionDelegate"
  },
  "title" : "MCSessionDelegate"
}
-->

# MCSessionDelegate

The `MCSessionDelegate` protocol defines methods that a delegate of the `MCSession` class can implement to handle session-related events. For more information, see [`MCSession`](/documentation/MultipeerConnectivity/MCSession).

```
protocol MCSessionDelegate : NSObjectProtocol
```

## Overview

Delegate calls occur on a private serial queue. If your app needs to perform an action on a particular run loop or operation queue, its delegate method should explicitly dispatch or schedule that work.

## Topics

### MCSession Delegate Methods

[`-  session:didReceiveData:fromPeer:`](/documentation/MultipeerConnectivity/MCSessionDelegate/session(_:didReceive:fromPeer:))

Indicates that an `NSData` object has been received from a nearby peer.

[`-  session:didStartReceivingResourceWithName:fromPeer:withProgress:`](/documentation/MultipeerConnectivity/MCSessionDelegate/session(_:didStartReceivingResourceWithName:fromPeer:with:))

Indicates that the local peer began receiving a resource from a nearby peer.

[`-  session:didFinishReceivingResourceWithName:fromPeer:atURL:withError:`](/documentation/MultipeerConnectivity/MCSessionDelegate/session(_:didFinishReceivingResourceWithName:fromPeer:at:withError:))

Indicates that the local peer finished receiving a resource from a nearby peer.

[`-  session:didReceiveStream:withName:fromPeer:`](/documentation/MultipeerConnectivity/MCSessionDelegate/session(_:didReceive:withName:fromPeer:))

Called when a nearby peer opens a byte stream connection to the local peer.

[`-  session:peer:didChangeState:`](/documentation/MultipeerConnectivity/MCSessionDelegate/session(_:peer:didChange:))

Called when the state of a nearby peer changes.

[`-  session:didReceiveCertificate:fromPeer:certificateHandler:`](/documentation/MultipeerConnectivity/MCSessionDelegate/session(_:didReceiveCertificate:fromPeer:certificateHandler:))

Called to validate the client certificate provided by a peer when the connection is first established.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)