Combines elements from two other publishers and delivers a transformed output.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
A second publisher.
A third publisher.
A closure that receives the most recent value from each publisher and returns a new value to publish.
A publisher that uses the
transform closure to emit new elements, produced by combining the most recent value from three upstream publishers.
The returned publisher waits until all three publishers have emitted an event, then delivers the oldest unconsumed event from each publisher as a tuple to the closure. For example, if publisher
P1 emits elements
b, and publisher
P2 emits elements
d, and publisher
P3 emits the event
e, the transform closure receives the tuple
(a, c, e). The closure won’t receive a tuple with elements
P3 emits another event. If any upstream publisher finishes successfully or fails with an error, the zipped publisher does the same.