Since Swift was released, Xcode comes with a feature called Playground. This is used to test Swift code in real time in a way that allows you to see the results without the need to execute the whole application.
The advantage of using Playground is that it is much faster to test than if you create new applications or unit tests when you have small tasks, such as testing the result of a signal or mutable property.
In this section, we are going to use Playground to test the ReactiveCocoa framework.
Start by creating a new Single View Application called RAC Playground
. As usual, check whether Swift is the main programming language for this project:
Choose your favorite way of installing ReactiveCocoa and then install it (time to practice!). Once everything is done, select the ReactiveCocoa project from Project Navigator (not your application), and add a playground to it by using the command + N shortcut in order to add a new file. When the dialog requesting you to choose a template...