How to weak link Combine in macOS 10.14 and iOS 12
Issue #593
#if canImport(Combine) is not enough, need to specify in Other Linker Flags
OTHER_LDFLAGS = -weak_framework Combine
Read more
Written by
Issue #593
#if canImport(Combine) is not enough, need to specify in Other Linker Flags
OTHER_LDFLAGS = -weak_framework Combine
Issue #527
import Foundation
import Combine
public typealias TaskCompletion = (Result<(), Error>) -> Void
public protocol Task: AnyObject {
var name: String { get }
func run(workflow: Workflow, completion: TaskCompletion)
}
public …Issue #513
A publisher that emits before the object has changed
Use workaround DispatchQueue to wait another run loop to access newValue
.onReceive(store.objectWillChange, perform: {
DispatchQueue.main.async {
self.reload()
}
}) …Issue #506
When a function expects AnyPublisher<[Book], Error> but in mock, we have Just
func getBooks() -> AnyPublisher<[Book], Error> {
return Just([
Book(id: "1", name: "Book 1"),
Book(id: …Issue #451
For some services, we need to deal with separated APIs for getting ids and getting detail based on id.
To chain requests, we can use flatMap and Sequence, then collect to wait and get all elements in a single publish
Transforms …