<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Combine",
  "identifier" : "/documentation/Combine/ConnectablePublisher",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Combine"
    ],
    "preciseIdentifier" : "s:7Combine20ConnectablePublisherP"
  },
  "title" : "ConnectablePublisher"
}
-->

# ConnectablePublisher

A publisher that provides an explicit means of connecting and canceling publication.

```
protocol ConnectablePublisher<Output, Failure> : Publisher
```

## Overview

Use a [`ConnectablePublisher`](/documentation/Combine/ConnectablePublisher) when you need to perform additional configuration or setup prior to producing any elements.

This publisher doesn’t produce any elements until you call its [`connect()`](/documentation/Combine/ConnectablePublisher/connect()) method.

Use [`makeConnectable()`](/documentation/Combine/Publisher/makeConnectable()) to create a [`ConnectablePublisher`](/documentation/Combine/ConnectablePublisher) from any publisher whose failure type is <doc://com.apple.documentation/documentation/Swift/Never>.

## Topics

### Performing explicit connections

[`connect()`](/documentation/Combine/ConnectablePublisher/connect())

Connects to the publisher, allowing it to produce elements, and returns an instance with which to cancel publishing.

### Connecting automatically

[`autoconnect()`](/documentation/Combine/ConnectablePublisher/autoconnect())

Automates the process of connecting or disconnecting from this connectable publisher.



---

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)