From the course: Learning Combine with Swift

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Create a simple Combine data stream

Challenge: Create a simple Combine data stream - Swift Tutorial

From the course: Learning Combine with Swift

Start my 1-month free trial

Challenge: Create a simple Combine data stream

(upbeat music) - [Instructor] In your first challenge, to tie in your understanding of the chapter, we'll create a simple playground that will consist of a publisher, subscriber and operator. You will start off by creating a publisher that will emit the values of a preset Boolean array. You will then create a counterpart subscriber that will listen for that broadcast and assign the results to a preset text field is enabled properly. To enable or disable bad text fields. Finally, you will create an operator that will drop the first two elements from that broadcast. I know this is a bit of a contrived use case, but it will demonstrate some of the basics from this chapter in preparation for the videos ahead. Switch to Xcode and select the exercise playground file. Good luck.

Contents