Extend Cocoa frameworks and Objective-C runtime APIs with ReactiveSwift bindings and extensions.
Composable unidirectional data flow with ReactiveSwift.
|ReactiveSwift Composable Architecture||
The Pointfree Composable Architecture using ReactiveSwift instead of Combine.
ReactiveSwift offers composable, declarative and flexible primitives that are built around the grand concept of streams of values over time.
These primitives can be used to uniformly represent common Cocoa and generic programming patterns that are fundamentally an act of observation, e.g. delegate pattern, callback closures, notifications, control actions, responder chain events, futures/promises and key-value observing (KVO).
Because all of these different mechanisms can be represented in the same way, it’s easy to declaratively compose them together, with less spaghetti code and state to bridge the gap.
Contracts of the ReactiveSwift primitives, Best Practices with ReactiveSwift, and Guidelines on implementing custom operators.
ReactiveSwift supports macOS 10.9+, iOS 9.0+, watchOS 2.0+, tvOS 9.0+ and Linux.
If you use Carthage to manage your dependencies, simply add
ReactiveSwift to your
github "ReactiveCocoa/ReactiveSwift" ~> 6.1
If you use Carthage to build your dependencies, make sure you have added
ReactiveSwift.framework to the "Linked Frameworks and Libraries" section of your target, and have included them in your Carthage framework copying build phase.
If you use CocoaPods to manage your dependencies, simply add
ReactiveSwift to your
pod 'ReactiveSwift', '~> 6.1'
If you use Swift Package Manager, simply add ReactiveSwift as a dependency
of your package in
.package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", from: "6.1.0")
git submodule update --init --recursivefrom within the ReactiveCocoa folder.
ReactiveSwift.xcodeprojinto your application’s Xcode project or workspace.
ReactiveSwift.frameworkto the “Embedded Binaries” section.
EMBEDDED_CONTENT_CONTAINS_SWIFTbuild setting to “Yes”.
We also provide a Playground, so you can get used to ReactiveCocoa's operators. In order to start using it:
git submodule update --init --recursiveOR, if you have Carthage installed
View > Show Debug Area
ReactiveSwift has no plan to declare ABI and module stability at the moment. It will continue to be offered as a source only dependency for the foreseeable future.
|Last commit: 4 days ago|
This is the release candidate of ReactiveSwift 6.7.0.
Signal offers two special variants for advanced users: unserialized and reentrant-unserialized. (#797)
The input observer of these variants assume that mutual exclusion has been enforced by its callers.
You can create these variants through four
Signal static methods:
reentrantUnserializedPipe(_:). These would be adopted by ReactiveCocoa UIKit bindings to improve interoperability with Loop, to tackle some legitimate recursive delivery scenarios (e.g. around first responder management), and also to reduce fine-grained locking in ReactiveCocoa.
Note that the default behavior of
Signal has not been changed — event serialization remains the default behavior.
SignalProducer offers an unserialized variant via
TestScheduler can now advanced its clock by
TimeInterval. (#828, kudos to @carsten-wenderdel)
Signal and Properties now use fewer locks, which should translate into minor performance improvements. (#797)
Fixed spelling error in
Lifetime.Token class documentation. (#835, kudos to @ansonj)
As a continued refactoring effort since ReactiveSwift 6.6.0, all unary
SignalProducer operators have been migrated to a new internal representation.
When debugging your application, the call stacks involving ReactiveSwift may now look cleaner, without the clutter of compiler-generated reabstraction thunks. See #799 for an example.