I have a view with a view model, and actions in this view can change the view model. To be able to break out logic into reusable pieces, I have part of the view
I'm having difficulties testing Combine. I'm following: https://www.swiftbysundell.com/articles/unit-testing-combine-based-swift-code/ Which tests: final class
In Swift you can define default values on a struct that can be overwritten on initialization: struct myStruct { var a: Int = 1 } var instance1 = myStruct()
If I have stored a cancellable set into a ViewController: private var bag = Set<AnyCancellable>() Which contains multiple subscription. 1 - Should I canc
So I'm digging into combine and this question came up. Is there any real difference between using CurrentValueSubject (and setting its value using currentValue
I am currently doing a project using SwiftUI and Combine. I'm on Xcode11 Beta 5. I would like to fetch my Github repositories, display them and then be able to
I've been watching the Data Flow Through SwiftUI WWDC talk. They have a slide with a sample code where they use a Timer publisher that gets connected to a Swift
This tutorial by Apple about SwiftUI uses a dollar sign to bind data, and I‘m having trouble finding more information about this data binding in SwiftUI.
Is there a way to have the publisher emit a value only to the latest subscriber/observer? An example for that would be; a manager class that can be subscribed t
This question has effectively been asked before (Combine assign publisher to PassthroughSubject) but the answer assumed the architecture of the question's examp
I am trying to create a class that executes data loading once and returns the data to all callers of the method while the data was loading to not perform the da
Im trying to test a simple publisher within the Combine framework and SwiftUI. My test tests a published bool named isValid in my view model. My view model al
I feel like I can sort of understand why what I'm doing isn't working but I'm still trying to wrap my head around Combine and SwiftUI so any help here would be
I'm looking for the best way to create a bind between textfields and ViewModel. At the moment I'm creating a @State for each textfield and I'm manually sending
Aim: I have a model which is an ObservableObject. It has a Bool property, I would like to use this Bool property to initialise a @Binding variable. Questions:
I have two lists of URLs that return some links to images. The lists are passed into a future like static func loadRecentEpisodeImagesFuture(request: [URL]) -&g
Trying to figure out how to make quick http requests using combine. I've mostly been looking at this doc by Apple. I haven't made any progress though and it see
My data model property is declared in my table view controller, and the SwiftUI view is modally presented. I'd like the presented Form input to manipulate the d
Basic approach I am currently tring to clean up my Core Data/SwiftUI code, and part of that is moving code out of my Views and into my ViewModels. Since it seem
When using @Published property wrapper following current SwiftUI syntax, it seems very hard to define a protocol that includes a property with @Published, or I