Search code examples
swiftfunctional-programmingfuturereactive-cocoa

How to Add Production Ready ReactiveCocoa or Futures / Promises Into Swift 2 iOS


I saw a Back to the Futures presentation by Javier Soto that got me excited about ReactiveCocoa and Functional Reactive Programming aka FRP. Ash Furrow's Functional Reactive Awesomeness With Swift presentation greatly helped convince me as well.

As of Nov 2015, I use the latest Xcode and Swift (Xcode 7.1 Swift 2 for iOS 8+). For a new project coming up in a couple days, I would like to use ReactiveCocoa or some other FRP framework. However, ReactiveCocoa 4.0 that supports Swift 2 is not production ready. It's in alpha. I don't know what to expect if I have a project that I might ship in a month or two using the alpha version. If I use alpha and use the basics, will it be bug free-ish with only api breaking changes now and then?

If one wants to use Swift 2 and FRP plus ship in a month, what's a smart move here?

How can I get a FRP framework into my new project now and what are the risks?

Other FRP frameworks: RxSwift, ReactKit


Solution

  • You can see the list of pending issues for ReactiveCocoa's 4.0 release here.

    Except for a few potential API changes, and a minor issue which has a workaround, 4.0 should be ready for production use (I've been using it in production for a while myself).

    Considering that, I'd strongly suggest going for RAC :)