Remember all the fuss about FRP back when Reactive Cocoa was all the new hotness? Kinda a good chuckle as 2020 approaches, isn’t it? Whilst its appeal turned out to be, as they say, selective, it and later FRP libraries such as RxSwift do have a following among those who don’t mind fighting the framework (have us tell you the story of the MQTT/Core Data/RAC stack we parachuted in to save the day for some time, if you want to see a visibly apoplectic troll, but hey, we managed to drag it across the liquidity event finish line, it’s all good) but general consensus is of the RxNot mindset that designing for maintainability is difficult enough already without seriously considering an architecture lacking any first party support and actively hostile to established platform paradigms…
… and then, all of a sudden! Here. We. Are. With. Combine:
Introducing Combine: Combine is a unified declarative framework for processing values over time. Learn how it can simplify asynchronous code like networking, key value observing, notifications and callbacks.
Combine in Practice: Expand your knowledge of Combine, Apple’s new unified, declarative framework for processing values over time. Learn about how to correctly handle errors, schedule work and integrate Combine into your app today.
Well, that’s certainly a great deal of previously passionate architectural debates rendered instantly obsolete, t‘isn’t it now? OK, Rx fans, take yourselves a victory lap for being all ahead of the game, grab yourself the RxSwift to Apple’s Combine Cheat Sheet and call it a day. The rest of us, well, time to get catching up now!
The first bookmark you need is this veritable epic of online documentation, by virtually unanimous agreement the most comprehensive and reliable source on this subject, not excluding Apple:
The book is available online at no cost. If you find the content useful, please consider supporting the effort with a purchase of the PDF or ePub version. The money collected for sales of this book will go to hiring editors (copyediting and technical editing), and if sufficient funds exist, hiring graphic design for diagrams. The content for this book, including sample code and tests, are sourced from the GitHub repository…
However, if that’s a little intimidating to dive right into, here’s our picks for the best quick reads and views to get started:
OK then, now that we’ve got some basic grounding, let’s take a look at some real example apps:
MovieSwiftUI: “SwiftUI & Combine app using MovieDB API. With a custom Flux (Redux) implementation.”
2048-swiftui: “2048 game using SwiftUI and Combine.”
CombineSlotMachine: “A basic slot machine game that demonstrates using the Combine framework in a UIKit app.”
And the next place to check out is the GitHub repos and Slack channel at
Combine Community: Community projects & experimentations around Apple’s Combine framework
GRDBCombine: “A set of extensions for SQLite, GRDB.swift, and Combine”
Should be right up to speed making it through all that!