Browsing Tag



The learning materials list for RxSwift

Reactive programming is awesome and really makes complex I/O stuff simple. However, FRP is totally different approach how you look at the events and programming. Such a change in thinking requires good quality materials which can make the learning…

Processed with VSCO with e5 preset

Memory management in RxSwift – DisposeBag

I’ve noticed a lot of beginners in RxSwift ask about DisposeBag. DisposeBag isn’t a standard thing in iOS development neither in other Rx’s implementations. Basically, it is how RxSwift handles memory management on iOS platform. In this article, I…


Default value after a countdown

Recently somebody asked me how he can send a default value if the stream hasn’t sent a new value in 5 minutes using RxSwift. The final solution is short, however it uses few operators like merge, concat & flatMapLatest…


How to handle errors in RxSwift

In recent days MVVM become very popular architecture design for iOS apps. Especially when RxSwift starts to gain more and more popularity. In RxMVVM most of properties are expressed by Observables. However, Observables terminate whenever they receive error or…

RxTest - How to test the Observable

RxTest – How to test the Observable in Swift

Few articles earlier I showed you how you can wrap presentation of UIAlertController with the Observable. Despite there weren’t any tests in the sample project, I’ve written the whole sample in TDD. I didn’t upload test files for the…


Presenting the UIAlertController with RxSwift

Showing an action sheet seems not to be a typical use case for the Observable. My first implementation ended with multiple PublishSubject inside UIViewController and ViewModel. Multiple subscriptions inside Observable’s chain is usually a code smell. Of course, I…


Thinking in RxSwift

It has been a long time since my last post. I wanted to prepare an article which will cover the theory which stands behind Observable and show the usage on real, not dummy example. It has turned out it…


RxSwift – Start using it today! The practical introduction

My journey with FRP has started with ReactiveCocoa v2.4 which was the most popular library implementing concepts of Functional Reactive Programming in Objective-C. At the beginning, I had a shallow understanding of ReactiveCocoa so I limited the usage only…