---
title: "subscribe(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/loadrequest/subscribe(_:)"
---

# subscribe(_:)

Attaches the specified subscriber to this publisher.

## Declaration

```swift
func subscribe<S>(_ subscriber: S) where Output == S.Input, S : Subscriber, S.Failure == any Error
```

## Parameters

- `subscriber`: The subscriber to attach to this publisher. After attaching, the subscriber can start to receive values.

## Discussion

Discussion Always call this function instead of Publisher/receive(subscriber:). Adopters of Publisher must implement Publisher/receive(subscriber:). The implementation of Publisher/subscribe(_:)-4u8kn provided by Publisher calls through to Publisher/receive(subscriber:).
