Learn how to use Combine—Apple’s newest declarative framework—to request and process data to and from APIs and SwiftUI.
Overview
Syllabus
Introduction
- Power up your app with Combine
- What you should know
- What is Combine?
- Shift to functional reactive programming
- Overview of SwiftUI
- Advantages of Combine
- Understand the Combine life cycle
- Transmit data with publishers
- Manipulate data with operators
- Consume data with subscribers
- Publish and subscribe to data with subjects
- Publish data once with Future and Just
- Challenge: Create a simple Combine data stream
- Solution: Create a simple Combine data stream
- Call REST APIs with DataTaskPublisher
- Handle errors with Combine
- Unit testing and Combine
- Challenge: Use Combine to call an API endpoint
- Solution: Use Combine to call an API endpoint
- Manage threads with schedulers
- Work with custom publishers and subscribers
- Throttle publisher data with backpressure
- Abstract Combine implementations with type erasures
- Leverage the Combine advanced operators
- Challenge: Call an API using schedulers and backpressure
- Solution: Call an API using schedulers and backpressure
- Go forth and code
Taught by
Doron Katz