© Bear Cahill 2021
B. CahillUI Design for iOS App Developmenthttps://doi.org/10.1007/978-1-4842-6449-2_16

16. URLSession Publisher

Bear Cahill1  
(1)
Denton, TX, USA
 

While this isn’t a book on Combine, I do want to go through a few more things from the framework. Hopefully, this chapter will give you an idea of how to approach using Combine. Also, I hope that you’ll see a more direct path for learning more in using this powerful framework.

In this chapter, we’ll look at fetching data. We’ll use a publisher and subscriber for that. We’ll fetch data from a server which will lead to updating the UI. For testing/preview, we’ll alternatively load data from a file also.

URLSession Publisher

If you’ve used URLSession before, you’re familiar with creating a ...

Get UI Design for iOS App Development: Using SwiftUI 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.