This course is available as part of the raywenderlich.com Professional subscription. To learn more click here
Pro

WWDC 2021: AsyncSequence vs. Combine

Jul 6 2021 · Video Course (10 mins) · Advanced

AsyncSequence is a new protocol in Swift 5.5 that offers facilities for processing asynchronous data. But is it a Combine replacement…? Let’s find out!

4.7/5 3 Ratings

Version

  • Swift 5.5, iOS 15, Xcode 13 Beta 2

WWDC 2021: AsyncSequence vs. Combine

To understand AsyncSequence, it will help to start thinking about it as a simple wrapper around an AsyncIterator — an aynschronous answer to Swift’s Sequence.

1

Swift’s concurrency system doesn’t have a type that matches what Combine’s Subjects can do, but that’s okay! Combine and AsyncSequence play nicely together.

2

Who is this for?

This is intended for iOS developers who have experience using Combine, an understanding of how Swift’s Sequence protocol works, and have at least experimented with async/await in Swift 5.5. If that doesn’t describe you quite yet, try following along anyway—the other courses on raywenderlich.com that can help you get up to speed will be called out.

Covered concepts

  • AsyncSequence
  • AsyncIteratorProtocol
  • Combine
  • Sequence
  • IteratorProtocol

Contributors

Comments