From the course: Learning Combine with Swift
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Work with custom publishers and subscribers - Swift Tutorial
From the course: Learning Combine with Swift
Work with custom publishers and subscribers
- There are times when your built-in publishers, operators and subscribers won't do. With Combine being a relatively new framework, you'll end up finding missing features and functionalities. We should expect Apple to bridge that gap over the next few years, but in the meantime, Apple has at least given us the tools to create our own custom publishers and subscribers. This is a relatively advanced topic which we will explore in a brief and higher level. Let's begin. First, let's recap the publisher and subscriber interaction workflow again. It's important before we look at creating a more advanced custom publisher and subscriber that we understand this. First, the subscriber subscribes to the publisher. The publisher then creates a subscription instance via the received subscription. The subscriber then requests values by setting demand through a subscription request method. Subscription then emits in response values back…
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)
Manage threads with schedulers4m 24s
-
(Locked)
Work with custom publishers and subscribers4m 45s
-
(Locked)
Throttle publisher data with backpressure4m 53s
-
(Locked)
Abstract Combine implementations with type erasures2m 8s
-
(Locked)
Leverage the Combine advanced operators5m 5s
-
(Locked)
Challenge: Call an API using schedulers and backpressure39s
-
(Locked)
Solution: Call an API using schedulers and backpressure2m 44s
-
(Locked)
-