In the upcoming sections, we will work with a sample project and see how can we create and subscribe to Observables in code.
Creating and subscribing to Observables
Project setup
As discussed earlier, we need to set up a workspace to work with RxSwift:
- Create a single view application project and name it RxBasics.
- Open Terminal and navigate to the project folder. Create a pod file inside your Xcode projects folder by executing the pod init command.
- Open the created pod file and paste the pod file's code:
# Uncomment the next line to define a global platform for your project
target 'RxBasics' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks...