The third version of RAC is focused around Swift with support for Objective-C API's. ReactiveCocoa (RAC) is a framework inspired by Functional Reactive Programming. It provides APIs for composing and transforming streams of values.
Questions tagged [reactive-cocoa-3]
52 questions
265
votes
1 answer
ReactiveCocoa vs RxSwift - pros and cons?
So now with swift, the ReactiveCocoa people have rewritten it in version 3.0 for swift
Also, there's been another project spun up called RxSwift.
I wonder if people could add information about what the differences in design/api/philosophy of the two…

Orion Edwards
- 121,657
- 64
- 239
- 328
10
votes
1 answer
How to make basic bindings in ReactiveCocoa 3 and 4
I've been reading up on ReactiveCocoa v3 lately and I'm struggling with just setting up basic stuff. I've already read the changelog, the tests, the few SO questions and the articles by Colin Eberhardt on the subject. However, I'm still missing…

Steffen D. Sommer
- 2,896
- 2
- 24
- 47
8
votes
2 answers
How to implement a basic UITextField input + UIButton action scenario using ReactiveCocoa 3?
I'm a Swift and ReactiveCocoa noob at the same time. Using MVVM and Reactive Cocoa v3.0-beta.4 framework, I'd like to implement this setup, to learn the basics of the new RAC 3 framework.
I have a text field and I want the text input to contain more…

aslı
- 8,740
- 10
- 59
- 80
7
votes
2 answers
ReactiveCocoa combine SignalProducers into one
I'm using ReactiveCocoa and I have several SignalProducers
let center = NSNotificationCenter.defaultCenter()
let signalProducer1 = center.rac_notification(name: notificationName1, object: nil)
let signalProducer2 = center.rac_notification(name:…

bjornorri
- 369
- 1
- 3
- 11
7
votes
2 answers
Can/How Should I replace my KVO stuff with RC3?
I'm trying to port an objc app which uses Facebook's KVOController, to Swift. I've been encouraged to look at RC3 as an alternate and more Swiftish approach. I've read some blogs and I'm encouraged to give this a try. But much of the docs and blogs…

Travis Griggs
- 21,522
- 19
- 91
- 167
5
votes
1 answer
How do I replace my KVO code with RAC3 and keep my existing models?
I am looking into ReactiveCocoa to improve our Swift code. As a starting point, I would like to bind the text of a label to the transformed value of a property. Basically, I would like to replace some KVO code. So, I have the following…

Bastian
- 4,638
- 6
- 36
- 55
5
votes
1 answer
How can I convert "SignalProducer" to "SignalProducer" of ReactiveCocoa 3?
I tried creating an instance of Action of ReactiveCocoa 3.
let action: Action = Action { _ in
if self.flag {
return self.fooSignalProducer // SignalProducer
} else…

r.izumita
- 450
- 1
- 4
- 13
4
votes
1 answer
DynamicProperty vs MutableProperty vs AnyProperty vs ConstantsProperty
What's difference between them? Could you give me an example of in which scenario I should use dynamic/mutable/any/constants property?

Philip Ding
- 41
- 2
4
votes
0 answers
Swift expected type Array<_>
I'm trying to write a UITableView RAC3 Binding helper in swift 2.
I'm trying to initialize my binding helper which has a signature init(tableView: UITableView, sourceSignal: SignalProducer<[T], NoError>, reuseIdentifier: String, selectionCommand:…

AndrewSB
- 951
- 3
- 11
- 25
4
votes
1 answer
How do I set up a ReactiveCocoa 3.0 podspec to be used as a 'private pod' with my test project?
I'm learning ReactiveCocoa by using a WORKBENCH project of mine. However, the latest CocoaPod's spec is for version 2.1.8 - and I want to use the ReactiveCocoa 3.0 to go thru the 'learning curve'. I thought of going the route of creating a 'Private…

John Basile
- 49
- 2
3
votes
2 answers
Create a moving average (and other FIR filters) using ReactiveCocoa
I'm still getting started with ReactiveCocoa and functional reactive programming concepts, so maybe this is a dumb question.
ReactiveCocoa seem naturally designed to react to streams of live data, touch events or accelerometer sensor input etc.
Is…

chris838
- 5,148
- 6
- 23
- 27
3
votes
2 answers
ReactiveCocoa 4: How to send error to an observer without interrupting the signal
let (signal, sink) = Signal<[CLBeacon], BeaconManagerError>.pipe()
When I call this because the user disabled the Bluetooth:
sendError(self.sink, error)
the Signal is interrupted and I don't receive more next nor interrupted events after enabling…

Fabio
- 1,757
- 19
- 33
3
votes
1 answer
Use ReactiveCocoa 3 and 4 with Core Data
I'm new to ReactiveCocoa and would like to use it as a replacement for KVO on some NSManagedObjects in a Swift 2 project.
Most of the examples I found online use RACObserve(), which has been removed(?) in RAC 3. The Changelog states, that the new…

Tim Bodeit
- 9,673
- 3
- 27
- 57
2
votes
2 answers
ReactiveCocoa - SignalProducer that emits the latest N values in array
I have a SignalProducer, ProducerA, that emits values in various intervals. I am trying to collect the latest N values that the SignalProducer emits and create a new producer, ProducerB, that emits an array containing the latest N values.
ProducerB…

gkaimakas
- 574
- 3
- 17
2
votes
1 answer
How do I observe a signal and immediately receive a `next` event if it has already occured?
I'm trying to wrap an API call that initializes an object after a network request. I don't want the network request to happen for every new observer, so as I understand it, I shouldn't be using SignalProducer. However, by using a single Signal,…

solidcell
- 7,639
- 4
- 40
- 59