<!--
{
  "availability" : [
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImmersiveMediaSupport",
  "identifier" : "/documentation/ImmersiveMediaSupport/ImmersiveMediaRemotePreviewSender/connectReceiver(name:endpoint:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Immersive Media Support"
    ],
    "preciseIdentifier" : "s:21ImmersiveMediaSupport0aB19RemotePreviewSenderC15connectReceiver4name8endpointySS_7Network10NWEndpointOtYaKF"
  },
  "title" : "connectReceiver(name:endpoint:)"
}
-->

# connectReceiver(name:endpoint:)

Adds an [`ImmersiveMediaRemotePreviewReceiver`](/documentation/ImmersiveMediaSupport/ImmersiveMediaRemotePreviewReceiver) to the sender as an active participant of the network preview. Any updates
on the sender will be propagated to all active receivers (frames, camera information, static metadata).

```
func connectReceiver(name: String, endpoint: NWEndpoint) async throws
```

## Parameters

`name`

The name associated with the receiver being connected.

## Discussion> Throws: This function throws if anything fails establishing the connection to the receiver..

---

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)