From the course: Learning Combine with Swift
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Manipulate data with operators - Swift Tutorial
From the course: Learning Combine with Swift
Manipulate data with operators
- [Instructor] Apple provides you with pre built functions that extend the capabilities of your publishers helping you refine your logic and these are called operators. Operators play a central part of the combined ecosystem. They extend your publishers by allowing you to filter and manipulate values from an upstream publisher modifying the stream along the way to your subscribers. The modified stream your subscribers get via the operator is considered a new publishing stream. The real power of operators come in the fact that you can chain multiple operators together, maybe even for multiple publisher streams into a consolidated stream for your subscribers the way you want it. You would leverage operators to perform specific error handling perhaps buffer the rate at which your incoming stream is coming from or perhaps performing some prefetching logic. Say we have one publisher or two and they are emitting output streams for…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Understand the Combine life cycle2m 13s
-
(Locked)
Transmit data with publishers5m 7s
-
(Locked)
Manipulate data with operators5m 44s
-
(Locked)
Consume data with subscribers4m 5s
-
(Locked)
Publish and subscribe to data with subjects4m 27s
-
(Locked)
Publish data once with Future and Just4m 56s
-
(Locked)
Challenge: Create a simple Combine data stream57s
-
(Locked)
Solution: Create a simple Combine data stream2m 9s
-
(Locked)
-
-
-