Releases: ReactiveCocoa/ReactiveSwift
6.4.0
This is the forth minor release of ReactiveSwift 6.
Changes
-
Minimum deployment target is now iOS 9.0+ when using Swift Package Manager, so as to silence Xcode 12 warnings. (#802)
-
Fix a debug assertion in
Lock.try()that could be raised in earlier OS versions (< iOS 10.0, < macOS 10.12). (#747, #788)Specifically, ReactiveSwift now recognizes
EDEADLKas expected error code frompthread_mutex_trylockalongside0,EBUSYandEAGAIN.
6.3.0
This is the third minor release of ReactiveSwift 6.
Additions
-
PropertyandMutablePropertycan now be used as property wrapper. Note that they remain a reference type container, so it may not be appropriate to use them in types requiring value semantics. (#781)class ViewModel { @MutableProperty var count: Int = 0 func subscribe() { self.$count.producer.startWithValues { print("`count` has changed to \(count)") } } func increment() { print("count prior to increment: \(count)") self.$count.modify { $0 += 1 } } }
-
When
combineLatestorzipover a sequence ofSignalProducers orPropertys, you can now specify an optionalemptySentinelparameter, which would be used when the sequence is empty.This becomes relevant, when the sequence of producers is calculated from some other Signal and the signal resulting from the joined producers is observed. If no value is sent when the sequence is empty, the observer gets terminated silently, and, e.g., the UI would not be updated.
(#774, kudos to @rocketnik)
Miscellaneous
- Test dependencies should no longer be built for SwiftPM users, as a result of ReactiveSwift moving to
swft-tools-version: 5.2. (#784)
6.2.1
This is a patch release of ReactiveSwift 6.2.
Changes
-
Improved performance of aggregating a sequence of
SignalandSignalProducerusing the staticcombineLatestandzipoperators. (#773, kudos to @rocketnik) -
Fixed the
SignalProducer.debounceoperator which does not deliver any value if having been started more than once. (#772, kudos to @gpambrozio)
6.2.0
Changes
-
FlattenStrategy.throttleis introduced. (#713, kudos to @inamiy)Given a first inner stream, all subsequent inner streams sent by the upstream would be dropped until the first inner stream has completed. The whole process repeats indefinitely until the upstream terminates. The behavior is akin to
throttle(_:on:)except for operating in the domain of streams instead of time. -
The package file of ReactiveSwift now declares supported platforms. (#761, kudos to @ikesyo)
-
Renamed
filterMaptocompactMapand deprecatedfilterMap(#746, kudos to @Marcocanc)
6.1.0
-
Support Swift 5.1 and Xcode 11 (#739, thanks @NachoSoto!)
-
Add
allandanyoperators with array of arguments (#735, kudos to @olejnjak)let property = Property.any([boolProperty1, boolProperty2, boolProperty3])
-
Add
<~binding operator toSignal.Observer(#635, kudos to @Marcocanc)
6.0.0
This release drops support for Swift 4.2 (Xcode 10/10.1) and removes the dependency on antitypical/Result. 🎉 (#702, kudos to @NachoSoto and @mdiep)
Upgrade to 6.0.0
- If you have used
Resultonly as dependency ofReactiveSwift, remove all instances ofimport Result,import enum Result.NoErrororimport struct Result.AnyErrorand remove theResultFramework from your project. - Replace all cases where
NoErrorwas used in aSignalorSignalProducerwithNever - Replace all cases where
AnyErrorwas used in aSignalorSignalProducerwithSwift.Error
5.0.1
5.0.0
This is the first release of ReactiveSwift 5.0. It requires Swift 4.2 or above.
Xcode 10.2 Support
- Swift 5.0 and Xcode 10.2 support (#707 and #711, kudos to @ChristopherRogers and @ikesyo)
Operators
Miscellaneous
- New convenience initializer for Action that takes a ValidatingProperty as its state (#637, kudos to @Marcocanc)
4.0.0
This is the first release of ReactiveSwift 4.0. It requires Swift 4.1 or above.
Xcode 10 Support
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 @ra1028)
Changes: <~ Bindings
-
<~bindings now works with optional left-hand-side operands. (#642, kudos to @andersio and @Ankit-Aggarwal)let nilTarget: BindingTarget<Int>? = nil // This is now a valid binding. Previously required manual // unwrapping in ReactiveSwift 3.x. nilTarget <~ notifications.map { $0.count }
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
- When unfair locks from libplatform are unavailable, ReactiveSwift now fallbacks to error checking Pthread mutexes instead of the default. Mitigations regarding issues with
pthread_mutex_trylockhave also been applied. (#654, kudos to @andersio) 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) - Fix some documentation errors about Carthage usage (#655)
- [CocoaPods] CocoaPods 1.4.0 is the minimum required version. (#651, kudos to @ikesyo)