Announcing Combine: Asynchronous Programming with Swift, Third Edition!

Begin learning Combine today and write declarative, asynchronous code for your iOS apps. Our updated book teaches you all about this awesome framework with real-world projects. By B. Patil.

Save for later
Share

Writing asynchronous code can be challenging! You have to juggle delegates, notification center, KVO, closures, and other mechanisms on top of managing the code in the rest of your app.

That’s why it was such a revolution among Swift developers when Apple introduced Combine two years ago! 🙌

But where should you begin learning Combine, if you haven’t picked it up already?

Meet our updated Combine book! 👋

Combine was introduced in WWDC 2019, and learning about it as an iOS Developer is a great long-term investment for your career. It’s a game-changing framework for managing event-driven development.

So, our Combine book is here to teach you all about:

  • Basics of Combine
  • Reactive Programming with Combine
  • Combine Operators, to manipulate data easily
  • SwiftUI with Combine
  • Error Handling with Combine
  • Custom Publishers, for more control over Combine

Who Is This Book For?

While this book covers a lot of Combine concepts that use advanced Swift features, like generics, if you’re a developer with at least an intermediate-level knowledge of Swift, this book is for you!

What’s Inside the Book?

The newly-updated edition of Combine: Asynchronous Programming with Swift kicks off your learning with the basics of Combine.

Section I: Introduction to Combine

In this part of the book, you’re going to ramp up over the basics of Combine and learn about some of the building blocks it comprises. You’ll learn what problems Combine aims to address and what some of the abstractions are Combine provides to help solve them:

  • Publisher
  • Subscriber
  • Subscription
  • Subject

And much more! Here’s a sneak peek at how publishers and subscribers work together:

Section II: Operators

Operators are a huge part of the Combine ecosystem which lets you manipulate values emitted from upstream publishers in meaningful and logical ways.

In this section, you’ll learn the majority of operators Combine has to offer, divided into useful groups:

  • Transforming
  • Filtering
  • Combining
  • Time Manipulation
  • Sequence

You’ll wrap up this section with a hands-on project, Collage Neue, to practice your newly-acquired knowledge.:

Section III: Combine in Action

This section is divided into five mini-chapters, each with its own focus on practical approaches for leveraging Combine for specific use-cases. You’ll learn how to:

  • Leverage Combine for networking.
  • How to debug your combine publishers.
  • How to use timers.
  • Observe KVO-compliant objects.
  • Manage resources in Combine.

Here’s a sneak peek at the project app you’ll building, News:

Section IV: Advanced Combine

This section covers the more advanced concepts in Combine. You’ll learn how to:

  • Use SwiftUI with Combine to build truly reactive and fluent UI experiences
  • Switch to learn how to properly handle errors in your Combine apps.
  • Use Schedulers, the core concept behind scheduling work.
  • Create your own custom publishers and handle the demand of subscribers by understanding backpressure.
  • Test your new Combine code.

Here’s a sneak peek at the Combine based SwiftUI project you’ll be building in this section:

Section V: Building a Complete App

Mastery takes practice, and practice you shall! It’s time to truly solidify the knowledge you’ve acquired throughout this chapter and build an entire app using Combine and SwiftUI.

Here’s a sneak peek at the final app you’ll be building—a Chuck Norris jokes app!

What Do You Need?

To follow along with this book, you’ll need the following:

  • A Mac running macOS Big Sur (11.0) or later. Catalina and earlier versions might work, but they’re untested for this edition.
  • Xcode 13 or later. Xcode is the main development tool for iOS. You’ll need Xcode 13 or later for the tasks in this book. Since Combine was introduced with the iOS 13 SDK, Xcode 12 should work as well – but the code in this book was tested against Xcode 13. You can download the latest version of Xcode from Apple’s developer site here: apple.co/2asi58y
  • An intermediate level knowledge of Swift. This book teaches you how to write declarative and reactive iOS applications using Apple’s Combine framework. Combine uses a multitude of advanced Swift features such as generics, so you should have at least an intermediate-level knowledge of Swift.

How to Get Your Own Copy

There are two ways you can get this book:

  • Buy it individually: If you want to build up a custom library without a subscription, you can choose to buy the book individually. It’s available now for just $59.99 in our online store.
  • Get it as part of our Pro subscription: Enjoy access to our videos and mobile development books in our Ultimate Pro subscription, including Combine: Asynchronous Programming with Swift! Right now, you can get a full year’s subscription and save 20% off the cost of a regular monthly subscription. It’s simply the best investment for your development career.

We hope you enjoy this book! Feel free to reach out to us if you have any questions.

Say Hi to our Team! 👋

Meet the awesome folks who contributed to this book…

Shai Mishali [Author]: Shai Mishali is an author and the final pass editor on this book. He’s the iOS Tech Lead for Gett, the global on-demand mobility company; as well as an international speaker, and a highly active open-source contributor and maintainer on several high-profile projects – namely, the RxSwift Community and RxSwift projects, but also releases many open-source endeavors around Combine such as CombineCocoa, RxCombine and more. As an avid enthusiast of hackathons, Shai took 1st place at BattleHack Tel-Aviv 2014, BattleHack World Finals San Jose 2014, and Ford’s Developer Challenge Tel-Aviv 2015. You can find him on GitHub and Twitter as @freak4pc.

Florent Pillet [Author]: Florent Pillet is an author of this book. He has been developing for mobile platforms since the last century and moved to iOS on day 1. He adopted reactive programming before Swift was announced, using it in production since 2015. A freelance developer, Florent also uses reactive programming on the server side as well as on Android and likes working on tools for developers like the popular NSLogger when he’s not contracting, training or reviewing code for clients worldwide. Say hello to Florent on Twitter and GitHub at @fpillet.

Marin Todorov [Author]: Marin Todorov is an author of this book. Marin is one of the founding members of the raywenderlich.com team and has worked on eight of the team’s books. He’s an independent contractor and has worked for clients like Roche, Realm, and others. Besides crafting code, Marin also enjoys blogging, teaching and speaking at conferences. He happily open-sources code. You can find out more about Marin at www.underplot.com.

B. Patil

Contributors

B. Patil

Author

Over 300 content creators. Join our team.