Instance Method


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


func autoconnect() -> Publishers.Autoconnect<Self>

Return Value

A publisher which automatically connects to its upstream connectable publisher.


Use autoconnect() to simplify working with ConnectablePublisher instances, such as those created with makeConnectable().

let autoconnectedPublisher = somePublisher

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software