---
title: "connectReceiver(name:endpoint:)"
framework: Immersive Media Support
role: symbol
role_heading: Instance Method
platforms: [macOS 26.0+]
path: "immersivemediasupport/immersivemediaremotepreviewsender/connectreceiver(name:endpoint:)"
---

# connectReceiver(name:endpoint:)

Adds an 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).

## Declaration

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

## Parameters

- `name`: The name associated with the receiver being connected.

## Discussion

Discussion note: This function throws if anything fails establishing the connection to the receiver..
