Getting started with the Combine framework in Swift

Click for: original source

Combine is a new framework by Apple introduced at WWDC 2019. The framework provides a declarative Swift API for processing values over time. Written by Antoine Van Der Lee.

By adopting Combine, you’ll make your code easier to read and maintain, by centralizing your event-processing code and eliminating troublesome techniques like nested closures and convention-based callbacks.

The article is split into:

  • What is Combine?
  • The basic principles of Combine
  • Memory management in Combine
  • Error types and streams
  • Debugging Combine streams
  • Using Combine with MVVM
  • When should I use Combine?

Plenty of code examples provided. Together with links to more resources for studying Combine. The whole framework is even better explained with its own Swift Playground. Great read!

[Read More]

Tags swiftlang programming tdd