Releases: ReactiveCocoa/ReactiveSwift
1.1.1
1.1.0
This is the first feature release of ReactiveSwift 1.x.
Additions
General
- New boolean operators:
and,orandnegated; 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 coalescesvalueevents 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 () -> Valueclosure. 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.endedonly if composition is needed. (#229, kudos to @andersio) - New factory method
Lifetime.make(), which returns a tuple ofLifetimeandLifetime.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 howValidatingPropertycan be used in an interactive form UI. (#182)
Changes
- Flattening a signal of
Sequenceno longer requires an explicitFlattenStrategy. (#199, kudos to @dmcrodrigues) BindingSourceProtocolhas been renamed toBindingSource. (#254)SchedulerProtocolandDateSchedulerProtocolhas been renamed toSchedulerandDateScheduler, respectively. (#257)take(during:)now handles endedLifetimeproperly. (#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
Signalwhich 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
Signals 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
ReactiveExtensionsProviderto expose areactiveproperty that’s generic overself. This property hosts reactive extensions to the type, such as the ones provided onNotificationCenterandURLSession. -
Property Composition
Propertys can now be composed. They expose many of the familiar operators fromSignalandSignalProducer, includingmap,flatMap,combineLatest, etc. -
Binding Primitives
BindingTargetProtocolandBindingSourceProtocolhave been introduced to allow binding of observable instances to targets.BindingTargetis a new concrete type that can be used to wrap a settable but non-observable property. -
Lifetime
Lifetimeis 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
ActioninitializerAction(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
enabledIfpredicate 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
attemptandattemptMapnow 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> innerDisposableofSerialDisposableandScopedDisposablehas been renamed. (#164)Signal.pipenow 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
startWithSignalnow disposes its signal appropriately under the newSignallifetime semantics. (#106)SignalProducer.timesis renamed toSignalProducer.repeat. (#119)- The labels of the
SequenceandSignalvariants ofSignalProducer.initare 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
Signals 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
DispatchTimeIntervalis now used in place ofTimeIntervalin APIs that would offsetDates. (#48, kudos to @liscio, @NachoSoto and @mdiep)- New
Actioninitializer:Action(state:enabledIf:_:). (#22, kudos to @sharplet and @mdiep)- Create an
Actionfrom aPropertywith 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
Actionthat would affect the availability of theAction.
- Create an
- New
Actioninitializer:Action(input:_:). (#22)- Create an
Actionwith aPropertyas its input.applywould 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
ReactiveExtensionsProvidernow provide a staticreactivefor extensions to the type. (#70, kudos to @sharplet)- Fixed a bug in
SignalProducer.onwhich caused the signal to be disposed of too early. (#80, kudos to @andersio and @ikesyo) - Restored
valueas the last parameter ofSignalProducer.on. (#104, kudos to @dmcrodrigues) - Fixed two race conditions related to
interrupteddelivery 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
Signals completes when they have no observers and no strong references to themScopedDisposables are generic over the inner disposableAtomic.modifynow usesinoutto pass the value, and returns the generic result from the supplied actionPropertysubsumedConstantProperty- Interoperability of
<~bindings withOptionals - Reactive extensions to Foundation are moved to
.reactive(theReactivestruct). - Notifications from
NotificationCenterare now modelled as hot signals.
Added
Lifetimefor completing signals when an instance deallocates.Reactivestruct 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
Signals completes when they have no observers and no strong references to themScopedDisposables are generic over the inner disposableAtomic.modifynow usesinoutto pass the value, and returns the generic result from the supplied actionPropertysubsumedConstantProperty- Interoperability of
<~bindings withOptionals - Reactive extensions to Foundation are moved to
.reactive(theReactivestruct).
Added
Lifetimefor completing signals when an instance deallocates.Reactivestruct for adding ReactiveSwift extensions- Composition operators for properties
Many more changes since ReactiveCocoa 4! Future releases will aim to have more complete release notes.