Releases: ReactiveCocoa/ReactiveSwift
1.1.0
This is the first feature release of ReactiveSwift 1.x.
Additions
General
- New boolean operators:
and
,or
andnegated
; available onSignal<Bool, E>
,SignalProducer<Bool, E>
andProperty<Bool, E>
types. (#160, kudos to @cristianames92) - New operator
filterMap
. (#232, kudos to @RuiAAPeres) - New operator
lazyMap(on:_:)
. It coalescesvalue
events when they are emitted at a rate faster than the rate the given scheduler can handle. The transform is applied on only the coalesced and the uncontended values. (#240, kudos to @liscio) - New protocol
BindingTargetProvider
, which replacesBindingTargetProtocol
. (#254, kudos to @andersio)
SignalProducer
- New initializer
SignalProducer(_:)
, which takes a@escaping () -> Value
closure. It is similar toSignalProducer(value:)
, but it lazily evaluates the value every time the producer is started. (#240, kudos to @liscio)
Lifetime
- New method
Lifetime.observeEnded(self:)
. This is now the recommended way to explicitly observe the end of aLifetime
. UseLifetime.ended
only if composition is needed. (#229, kudos to @andersio) - New factory method
Lifetime.make()
, which returns a tuple ofLifetime
andLifetime.Token
. (#236, kudos to @sharplet)
Properties
ValidatingProperty
: A mutable property that validates mutations before committing them. (#182, kudos to @andersio).- A new interactive UI playground:
ReactiveSwift-UIExamples.playground
. It demonstrates howValidatingProperty
can be used in an interactive form UI. (#182)
Changes
- Flattening a signal of
Sequence
no longer requires an explicitFlattenStrategy
. (#199, kudos to @dmcrodrigues) BindingSourceProtocol
has been renamed toBindingSource
. (#254)SchedulerProtocol
andDateSchedulerProtocol
has been renamed toScheduler
andDateScheduler
, respectively. (#257)take(during:)
now handles endedLifetime
properly. (#229)
Deprecations
1.0.1
This is a maintenance release of ReactiveSwift 1.0.
Changes
- Fixed a couple of infinite feedback loops in
Action
. (#221) - Fixed a race condition of
Signal
which might result in a deadlock when a signal is sent a terminal event as a result of an observer of it being released. (#267)
Acknowledgements
Kudos to @mdiep, @sharplet and @andersio who helped review the pull requests.
1.0.0
ReactiveSwift 1.0 🎉
This is the first major release of ReactiveSwift, a multi-platform, pure-Swift functional reactive programming library spun off from ReactiveCocoa. As Swift continues to expand beyond Apple’s platforms, we hope that ReactiveSwift will see broader adoption. To learn more, please refer to ReactiveCocoa’s CHANGELOG.
Major changes since ReactiveCocoa 4 include:
-
Updated for Swift 3
APIs have been updated and renamed to adhere to the Swift 3 API Design Guidelines.
-
Signal Lifetime Semantics
Signal
s now live and continue to emit events only while either (a) they have observers or (b) they are retained. This clears up a number of unexpected cases and makes Signals much less dangerous. -
Reactive Proxies
Types can now declare conformance to
ReactiveExtensionsProvider
to expose areactive
property that’s generic overself
. This property hosts reactive extensions to the type, such as the ones provided onNotificationCenter
andURLSession
. -
Property Composition
Property
s can now be composed. They expose many of the familiar operators fromSignal
andSignalProducer
, includingmap
,flatMap
,combineLatest
, etc. -
Binding Primitives
BindingTargetProtocol
andBindingSourceProtocol
have been introduced to allow binding of observable instances to targets.BindingTarget
is a new concrete type that can be used to wrap a settable but non-observable property. -
Lifetime
Lifetime
is introduced to represent the lifetime of any arbitrary reference type. This can be used with the newtake(during:)
operator, but also forms part of the new binding APIs. -
Race-free Action
A new
Action
initializerAction(state:enabledIf:_:)
has been introduced. It allows the latest value of any arbitrary property to be supplied to the execution closure in addition to the input fromapply(_:)
, while having the availability being derived from the property.This eliminates a data race in ReactiveCocoa 4.x, when both the
enabledIf
predicate and the execution closure depend on an overlapping set of properties.
Extensive use of Swift’s @available
declaration has been used to ease migration from ReactiveCocoa 4. Xcode should have fix-its for almost all changes from older APIs.
Thank you to all of @ReactiveCocoa/reactiveswift and all our contributors, but especially to @andersio, @liscio, @mdiep, @NachoSoto, and @sharplet. ReactiveSwift is only possible due to the many hours of work that these individuals have volunteered. ❤️
1.0.0 Release Candidate 3
This is the third release candidate of ReactiveSwift 1.0.0.
Changed since Release Candidate 2
- Fixed the unbound memory growth of unidirectional bindings. (#176)
- Fixed a leak in
CompositeDisposable.DisposableHandle
. (#177)
Acknowledgements
Kudos to @mdiep, @liscio and @andersio who helped review the pull requests.
Previous Releases
1.0.0 Release Candidate 2
This is the second release candidate of ReactiveSwift 1.0.0.
New since Release Candidate 1
attempt
andattemptMap
now have a variant that interoperates with native Swift error handling. (#141, kudos to @sharplet)
Changed since Release Candidate 1
- Fixed broken non-optional to optional bindings. (#165)
Specifically:Target<Value?> <~ Source<Value>
innerDisposable
ofSerialDisposable
andScopedDisposable
has been renamed. (#164)Signal.pipe
now returns a named tuple. (#153, kudos to @sharplet)
Acknowledgements
Kudos to @mdiep, @sharplet, @liscio and @andersio who helped review the pull requests.
Previous Releases
1.0.0 Release Candidate 1
This is the first release candidate of ReactiveSwift 1.0.0.
New since alpha 4
- New operator:
withLatest(from:)
. (#128, kudos to @inamiy) - New operator:
throttle(while:on:)
. (#58, kudos to @sharplet) - Streamlined binding operator implementation with the new
BindingSourceProtocol
. (#131, kudos to @mdiep)
Changed since alpha 4
startWithSignal
now disposes its signal appropriately under the newSignal
lifetime semantics. (#106)SignalProducer.times
is renamed toSignalProducer.repeat
. (#119)- The labels of the
Sequence
andSignal
variants ofSignalProducer.init
are now dropped. (#120) - Composed properties no longer capture its sources. (#117)
Property.init(_:)
now creates a property which observes the given property without retaining it. The existential property initializer is now renamed toProperty.init(capturing:)
, and is subject to deprecation when generalised existentials land. (#117)URLSession.reactive.data(with:)
now wraps its error inAnyError
. (#133, kudos to @ikesyo)- All terminal events are now allowed to be sent recursively to prevent
Signal
s from deadlocks due to concurrent reference counting races. (#137, kudos to @andersio and @mdiep) - Disposables are now faster with the adoption of lock-free primitives. (#107, kudos to @andersio)
Acknowledgements
Kudos to @mdiep, @NachoSoto, @sharplet, @ikesyo, @liscio and @andersio who helped review the pull requests. Kudos also to @iv-mexx who helped update the documentation.
Previous Releases
1.0.0 alpha 4
New since alpha 3
DispatchTimeInterval
is now used in place ofTimeInterval
in APIs that would offsetDate
s. (#48, kudos to @liscio, @NachoSoto and @mdiep)- New
Action
initializer:Action(state:enabledIf:_:)
. (#22, kudos to @sharplet and @mdiep)- Create an
Action
from aProperty
with an availability predicate to be applied on the property. Note that the execution closure would be passed not only the input fromapply(_:)
, but also the latest property value observed by theAction
. - This new variant is recommended for modelling UI that has inputs to the
Action
that would affect the availability of theAction
.
- Create an
- New
Action
initializer:Action(input:_:)
. (#22)- Create an
Action
with aProperty
as its input.apply
would accept no input, but takes the latest value from the property instead. - If you supply a property of optional, the action is executed only if the input is not
nil
.
- Create an
Changed since alpha 3
ReactiveExtensionsProvider
now provide a staticreactive
for extensions to the type. (#70, kudos to @sharplet)- Fixed a bug in
SignalProducer.on
which caused the signal to be disposed of too early. (#80, kudos to @andersio and @ikesyo) - Restored
value
as the last parameter ofSignalProducer.on
. (#104, kudos to @dmcrodrigues) - Fixed two race conditions related to
interrupted
delivery inSignal
. (#123, kudos to @andersio and @NachoSoto) - Faster
Bag
. (#126, kudos to @andersio)
Acknowledgements
Kudos to @mdiep, @NachoSoto, @sharplet, @ikesyo and @andersio who helped review the pull requests. Kudos also to @iv-mexx, @morganchen12 and @Iyuna who helped update the documentation and the playgrounds.
1.0.0 alpha 3
This is an alpha release of ReactiveSwift. It targets Swift 3.0. Please be aware that more breaking changes are expected.
Improved
- APIs have been updated for Swift 3
Signal
s completes when they have no observers and no strong references to themScopedDisposable
s are generic over the inner disposableAtomic.modify
now usesinout
to pass the value, and returns the generic result from the supplied actionProperty
subsumedConstantProperty
- Interoperability of
<~
bindings withOptional
s - Reactive extensions to Foundation are moved to
.reactive
(theReactive
struct). - Notifications from
NotificationCenter
are now modelled as hot signals.
Added
Lifetime
for completing signals when an instance deallocates.Reactive
struct for adding ReactiveSwift extensions- Composition operators for properties
Many more changes since ReactiveCocoa 4! Future releases will aim to have more complete release notes.
1.0.0-alpha.2
This is an alpha release of ReactiveSwift. It targets Swift 3.0. Please be aware that more breaking changes are expected.
Improved
- APIs have been updated for Swift 3
Signal
s completes when they have no observers and no strong references to themScopedDisposable
s are generic over the inner disposableAtomic.modify
now usesinout
to pass the value, and returns the generic result from the supplied actionProperty
subsumedConstantProperty
- Interoperability of
<~
bindings withOptional
s - Reactive extensions to Foundation are moved to
.reactive
(theReactive
struct).
Added
Lifetime
for completing signals when an instance deallocates.Reactive
struct for adding ReactiveSwift extensions- Composition operators for properties
Many more changes since ReactiveCocoa 4! Future releases will aim to have more complete release notes.
1.0.0-alpha.1
This is the first alpha release of ReactiveSwift. It targets Swift 3.0. Please be aware that more breaking changes are expected.
Improved
- APIs have been updated for Swift 3
Signal
s completes when they have no observers and no strong references to themScopedDisposable
s are generic over the inner disposableAtomic.modify
now usesinout
to pass the value, and returns the generic result from the supplied actionProperty
subsumedConstantProperty
- Interoperability of
<~
bindings withOptional
s
Added
Lifetime
for completing signals when an instance deallocates.- Composition operators for properties
Many more changes since ReactiveCocoa 4! Future releases will aim to have more complete release notes.