Book Image

Reactive Programming with Swift

By : Cecil Costa
Book Image

Reactive Programming with Swift

By: Cecil Costa

Overview of this book

<p><span id="description" class="sugar_field">Reactive programming helps you write applications that are more powerful and efficient. You can write more software, help more people, and create applications that scale. Reactive programming is a growing paradigm that we will help you set to work in Swift.</span></p> <p><span class="sugar_field"><span id="description" class="sugar_field"> Reactive Programming with Swift guides you through migrating from the traditional way of developing to the new ReactiveCocoa framework, which uses Swift as its main programming language. You will learn how to develop with this framework, debug code, create unit tests, use additional frameworks, and convert a traditional framework into a ReactiveCocoa one.</span></span></p> <p><span class="sugar_field"><span id="description" class="sugar_field"><span id="description" class="sugar_field"> Starting with a crash course on the fundamental concepts of Reactive programming, we’ll set you up so you’re ready to create reactive applications. We’ll then move on to topics such as Graphical events, Streaming, and Core data, which will help you dive deeper with advanced programming. The concept of switching your programming concepts from imperative to functional reactive programming will also be covered. By the end of this book, you will be able to successfully create highly functional apps using Swift.</span> </span></span></p>
Table of Contents (14 chapters)
Reactive Programming with Swift
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Creating a new framework


Do you think that it is easier fighting against a lion or against 20 kittens? Here, we have the same problem. Changing a small application such as this one is not difficult; however, changing a huge application may be very complicated. However, what if we divided the application into small chunks?

One good starting point is changing parts of your application and making it work with ReactiveCocoa, and a good way to do this is creating a framework. It is also a good idea to create this framework to reuse your code for future developments.

Note

As Swift doesn't support static libraries, this option mustn't be provided when using ReactiveCocoa.

Set a new target for your project, but this time pay attention as you have to select the Framework & Library section, and select the Cocoa Touch Framework option as it is demonstrated in the following screenshot:

When the dialog that requests data for this framework appears, you have to set a few details. Call this framework...