Skip to content

1.0.0

Compare
Choose a tag to compare
@mdiep mdiep released this 01 Jan 23:16
· 1046 commits to master since this release

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 ReactiveExtensionsProvider to expose a reactive property that’s generic over self. This property hosts reactive extensions to the type, such as the ones provided on NotificationCenter and URLSession.

  • Property Composition

    Propertys can now be composed. They expose many of the familiar operators from Signal and SignalProducer, including map, flatMap, combineLatest, etc.

  • Binding Primitives

    BindingTargetProtocol and BindingSourceProtocol 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 new take(during:) operator, but also forms part of the new binding APIs.

  • Race-free Action

    A new Action initializer Action(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 from apply(_:), 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. ❤️