4.0.0 Release Candidate 1
Pre-release
Pre-release
This is the first release candidate of ReactiveSwift 4.0. It requires Swift 4.1.
Operators
- New method
collect(every:on:skipEmpty:discardWhenCompleted:)which delivers all values that occurred during a time interval (#619, kudos to @Qata) debouncenow offers an opt-in behaviour to preserve the pending value when the signal or producer completes. You may enable it by specifyingdiscardWhenCompletedas false (#287, kudos to @Qata)- New property operator:
filter(#586, kudos to @iv-mexx) - New operator
merge(with:)(#600, kudos to @ra1028) - New operator
map(value:)(#601, kudos to @ra1028) SignalProducer.merge(with:),SignalProducer.concat,SignalProducer.prefix,SignalProducer.then,SignalProducer.and,SignalProducer.or,SignalProducer.zip(with:),SignalProducer.sample(with:),SignalProducer.sample(on:),SignalProducer.take(until:),SignalProducer.take(untilReplacement:),SignalProducer.skip(until:),SignalProducer.flatMap,SignalProducer.flatMapError,SignalProducer.combineLatest(with:),Signal.flatMap,Signal.flatMapError,Signal.withLatest(from:)andProperty.init(initial:then:)now acceptSignalProducerConvertibleconforming types (#610, #611, kudos to @1028)
Changes: Conditional Conformance
- For Swift 4.1 and above,
BindingSourceconformances are required to haveErrorparameterized as exactlyNoError. As a result,SignalandSignalProducerare now conditionallyBindingSource. (#590, kudos to @NachoSoto and @andersio) - For Swift 4.1 and above,
Signal.EventandActionErrorare now conditionallyEquatable. (#590, kudos to @NachoSoto and @andersio)
Interoperability
- Result now interoperates with SignalProducer n-ary operators as a constant producer (#606, kudos to @Qata)
Miscellaneous
Lifetimemay now be manually ended usingLifetime.Token.dispose(), in addition to the existing when-token-deinitializes semantic. (#641, kudos to @andersio)Bagmay now be initialised with a sequence of elements. (#609, kudos to @ra1028)- Non-class types may now conform to
ReactiveExtensionProvider. (#636, kudos to @ra1028)