Combine


Introducing the Combine Framework (One day)

This hands-on, one day introductory course is for experienced Swift developers who are new to the Combine framework. To book this course for your group, company, or public event see Booking and Availability.

What you'll learn


The Combine framework provides a unified way for handling asynchronous data flow in your iOS and Mac applications.

You learn to take advantage of the publishers that Apple has introduced in UIKit, AppKit, Foundation, SwiftUI, and elsewhere.

You create subscriptions by subscribing to publishers with assign and sink.

We review concepts from functional programming that you've use with Arrays in Swift to motivate the step that makes Combine so useful. Often the type that the publisher is publishing and the type that the subscriber needs don't match. Combine's operators make it easy to transform types, filter out what you don't want, and combine publishers together. We'll spend a lot of time working with these operators that allow us to access the full power of Combine.

What you need


You need a Mac running the latest version of Xcode. You'll create projects throughout the day.

Syllabus Highlights


The Path to Combine

We begin with MVC

Delegates and Protocols

Closures

View Models and Presenters

Functional Foundations

Arrays

map

filter

zip

flatMap

Extended Example

Published

Assign

Map

Zip

Other Operators

Sink

Dispose Bag

Store

Separating the concerns

Examples (chosen from below)

Notifications

URLSession

CoreData

Passthrough