The fourth version of RAC. ReactiveCocoa (RAC) is a Cocoa framework inspired by Functional Reactive Programming. It provides APIs for composing and transforming streams of values over time.
Questions tagged [reactive-cocoa-4]
48 questions
1
vote
0 answers
Radio button logic with Reactive Cocoa and avoid deadlock
My goal is to implement radio buttons using ReactiveCocoa. This means I have an array of child viewModels and only one can be in a selected state at a time. I also want the ability to quickly switch to multi-select when I want but my problem is with…

enamrik
- 2,292
- 2
- 27
- 42
1
vote
1 answer
RAC MutableProperty Producer not sending events to subscribers
I'm developing an app with RAC4 that fetches a list of city objects from a sever and returns them as JSON. I handle the response by storing each city and its appropriate properties as a City object. I then map each City into a CityViewModel type and…

Michael Bopp
- 656
- 1
- 4
- 13
1
vote
1 answer
ReactiveCocoa: creating a signal that applies a map over an observer
From what I understand, the RACSubject equivalent of ReactiveCocoa 4 is the Observer class.
I want to have a signal and an observer linked together so that the signal sends events applying a map operation to the events sent to the observer.
In Obj-C…

user3099609
- 2,318
- 18
- 20
1
vote
1 answer
Understanding a basic Swift compiler error
I understand why this produces a compiler error:
let initialProducer = SignalProducer(value:42)
let sideEffectProducer = initialProducer.on(next: { (answer: Int) in
return _
})
The error is
Cannot convert value of type '(Int) ->…

Remover
- 1,616
- 1
- 17
- 27
1
vote
1 answer
CocoaAction not triggering Action
I'm trying to get the CocoaAction to invoke the Action. The CocoaAction is triggered but the Action is never executed. Can anyone see where I'm going wrong with this?
let a = Action { val in
return SignalProducer {…

Erik Johansson
- 1,188
- 1
- 8
- 22
1
vote
1 answer
How to map values and errors on SignalProducer
how do I map this
func save() -> SignalProducer
to
var saveAction: Action
i'm a bit confused with the syntax
service.save()
.observeOn(QueueScheduler.mainQueueScheduler)
…

Ant
- 747
- 1
- 8
- 19
1
vote
2 answers
how to achieve two way binding using ReactiveCocoa 4.0 and MVVM
I am working in a project using Reactive Cocoa 4.0 and MVVM(swift 2.0).In view model I have string that will update according to the textfield changes,but i need to update that textfield if the string changes.Is it possible for two way binding…

Kiran P Nair
- 2,041
- 22
- 31
1
vote
1 answer
Extending SignalProducerType in case Value is an Array
I have a protocol for fetching database objects by PrimaryKey
typealias PrimaryKey = String
protocol PrimaryKeyConvertible {
var pkValue : PrimaryKey { get }
static func pkObject(key: PrimaryKey) -> Self?
}
and I want to extend the…

Edward Ashak
- 2,411
- 2
- 23
- 38
1
vote
1 answer
ReactiveCocoa 4 - Creating a dependent login request that runs only once
I've mostly been using ReactiveCocoa in the past to simply bind views and view models, and now I'm trying to take the plunge and use it throughout a new project but I'm having trouble getting my head around a couple of things.
What I want to do is…

Jarrod Robins
- 1,866
- 2
- 17
- 23
0
votes
1 answer
RACSubject migration to ReactiveCocoa 5 (Swift 3)
I have to migrate an application from ReactiveCocoa 4 to ReactiveCocoa 5 (due to Swift 3 migration)
The old implementation uses some RACSubject instances for triggering (performOperationSubject.sendNext) an operation and for handling…

cristallo
- 1,951
- 2
- 25
- 42
0
votes
1 answer
How to create MutableProperty from MutableProperty in Swift ReactiveCocoa 4
Is there any easy way to create MutableProperty from MutableProperty in Swift ReactiveCocoa 4?
I have a case that, and I want an way to create classB with classA, in which I need to setup statusB with statusA, but how to do this?
class ClassA {
…

JerryZhou
- 4,566
- 3
- 37
- 60
0
votes
1 answer
rac_command only responds to single click
I am trying to detect clicks on an UIElement like a button using Reactive Cocoa, using RAC for the first time in MVVM architecture.
I set the rac_command for my button in my ViewController.
addContactBtn.rac_command = viewModel.addContact
My…

Ajax
- 1,689
- 4
- 20
- 29
0
votes
1 answer
How to change the new version RAC(ReactiveCocoa) in a project?
When I open my iOS project built before the iOS 10 was released, I find it has an error about the ReactiveCocoa because of the version of swift. I try to use the method provided by Github, but it seems I failed. There are at least 18 errors when I…

Sheryl
- 35
- 6
0
votes
1 answer
Reactive cocoa attemptmap return type
I want to create extension on SignalProducerType as below.
extension SignalProducerType{
func mapR() -> SignalProducer<[String:AnyObject], XError> {
return attemptMap { (value: [String:AnyObject]) -> Result<[String:AnyObject],…

Swift Hipster
- 1,604
- 3
- 16
- 24
0
votes
1 answer
Reactivecocoa: wait for several firebase requests to complete (swift)
I have several requests to my Firebase database that are contains in a signalProducer like this one:
static func parseOne(snap: FIRDataSnapshot) -> SignalProducer {
return SignalProducer { subscriber, disposable in
let…

Leguman
- 2,104
- 1
- 18
- 22