© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
P. FrieseAsynchronous Programming with SwiftUI and Combinehttps://doi.org/10.1007/978-1-4842-8572-5_12

12. Wrapping Existing APIs in Combine

Peter Friese1  
(1)
Hamburg, Germany
 

Apple provides Combine publishers for many of their APIs, making it easy for us to integrate those APIs in our Combine pipelines. However, there are many APIs that don’t support Combine even though they produce events over time. Thankfully, Apple gives us the tools we need to wrap APIs in Combine publishers and make them accessible to Combine pipelines.

In this chapter, I’m going to walk you through the process of wrapping existing APIs using Combine.

A Case Study

We’re going to use a ...

Get Asynchronous Programming with SwiftUI and Combine: Functional Programming to Build UIs on Apple Platforms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.