860 questions
0 votes
1 answer
79 views
What is correct way to make a UIButton change a MutableProperty?
The following code works: import UIKit import ReactiveSwift import ReactiveCocoa class ViewController: UIViewController { let myAction = Action<UIButton, (), Never> { _ in return ...
0 votes
2 answers
173 views
Reduce array of properties ReactiveSwift
I have an array of Property<Int>, and I need to reduce them to get sum of the last inputs (it's basically an unread notification counter from different SDK's) and put that into new Property<...
0 votes
0 answers
91 views
Migrating from ObjC KVO to ReactiveSwift
I'm trying to migrate some parts of a project that was initially written in Obj-C. Currently I'm trying to migrate a code that relies heavily on signals. To give you a general idea of what I'm trying ...
1 vote
1 answer
229 views
How to map a completed event to an interrupt event when take(duringLifetimeOf:) happened in ReactiveSwift
For example, I want to send a request in my viewModel, if the viewModel is dealloc. The request signal should send interrupt event. This is my code func request() -> SignalProducer<Data, Error&...
0 votes
1 answer
114 views
MultiThreaded delaying class deallocation
below i am defining a solution and using interval as a timer in background thread as follow : @weakify(self) //IMPORTANT:- Throttle is working exactly the same way debounce works in RX SO DO NOT USE ...
0 votes
2 answers
3k views
when I run this NPX POD-INSTALL it gives me this COCOAPODS IS NOT SUPPORTED IN THIS PROJECT #ReactNative
Package.json { "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --...
20 votes
3 answers
16k views
Combine previous value using Combine
How can I rewrite ReactiveSwift/ReactiveCocoa code using Combine framework? I attached screenshot what combinePrevious mean from docs. let producer = SignalProducer<Int, Never>([1, 2, 3])....
0 votes
1 answer
301 views
Should I check the existence of weakself before use @strongify(self) in ReactiveObjc?
As the other practice in weak and strong, it recommends that we should check whether the weakself is null before we strongify it. It looks like this: __weak weakself = self someblock { if (weakself)...
0 votes
1 answer
642 views
Ambiguous use of operator '<~' in ReactiveSwift
I inherited a somewhat old project written in ReactiveSwift (v3.1.0) and ReactiveCocoa (v7.2.0). When I opened it on Xcode 10.1, it was built without an issue. But when I did the same on Xcode 10.3, I ...
0 votes
1 answer
171 views
'() -> BindingTarget<Error>' is not convertible to '(Bool) -> BindingTarget<Error>'
I recently inherited a iOS project written using ReactiveSwift 3.1.0 and ReactiveCocoa 7.2.0. I'm tasked with updating it to Swift 5 and the latest ReactiveSwift versions. I updated ReactiveSwift to ...
0 votes
1 answer
330 views
Dont complete on fail in Reactive Swift
I have a function capturing events from an api which works great. The only issue is i dont want the stream to be complete when it fails. public func getDeviceEvent(deviceUID: String) -> ...
1 vote
0 answers
377 views
How to use SignalProducer.timer for ReactiveCocoa 9.0
I'm working on updating an app from Swift 3 to Swift 5. This requires updating ReactiveCocoa. There is some code that was using a timer within a SignalProducer that no longer works when updating. Here ...
0 votes
1 answer
1k views
rx.sentMessage(#selector(UIViewController.viewDidLoad)) is not firing
I have an app using RxSwift following MVVM. ViewController import UIKit import RxSwift import RxCocoa final class ProfileViewController: BaseViewController<ProfileView> { var viewModel: ...
1 vote
1 answer
116 views
Designing observable objects
Preface: this is a design question about reactive programming. It's intended to be language agnostic, so it's all psuedo-codey. I suspect whatever the right answer is, would be equally applicable ...
0 votes
1 answer
107 views
reactivecocoa rac binding bool array to set mutilple uilabel text
I have a statusArray and to show the UILabel texts based on the Bool value say , 1 show someString then 0 show some other string how should I do that use rac as ReactiveCocoa ?