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. ❤️