<!--
{
  "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/MCNearbyServiceAdvertiserDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Multipeer Connectivity"
    ],
    "preciseIdentifier" : "c:objc(pl)MCNearbyServiceAdvertiserDelegate"
  },
  "title" : "MCNearbyServiceAdvertiserDelegate"
}
-->

# MCNearbyServiceAdvertiserDelegate

The `MCNearbyServiceAdvertiserDelegate` protocol describes the methods that the delegate object for an `MCNearbyServiceAdvertiser` instance can implement for handling events from the `MCNearbyServiceAdvertiser` class.

```
protocol MCNearbyServiceAdvertiserDelegate : NSObjectProtocol
```

## Overview

No assumption should be made about which queue the delegate methods are called on. It is the receiver’s responsibility to ensure that any `UIKit` updates are called on the main thread.

## Topics

### Error Handling Delegate Methods

[`-  advertiser:didNotStartAdvertisingPeer:`](/documentation/MultipeerConnectivity/MCNearbyServiceAdvertiserDelegate/advertiser(_:didNotStartAdvertisingPeer:))

Called when advertisement fails.

### Invitation Handling Delegate Methods

[`-  advertiser:didReceiveInvitationFromPeer:withContext:invitationHandler:`](/documentation/MultipeerConnectivity/MCNearbyServiceAdvertiserDelegate/advertiser(_:didReceiveInvitationFromPeer:withContext:invitationHandler:))

Called when an invitation to join a session is received from a nearby peer.

## 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)