Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ReactiveCocoa/ReactiveSwift
Streams of values over time
https://github.com/ReactiveCocoa/ReactiveSwift
reactive-programming reactive-streams reactiveswift swift
Last synced: 3 months ago
JSON representation
Streams of values over time
- Host: GitHub
- URL: https://github.com/ReactiveCocoa/ReactiveSwift
- Owner: ReactiveCocoa
- License: mit
- Created: 2016-05-21T16:20:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T09:06:54.000Z (8 months ago)
- Last Synced: 2024-05-18T13:41:25.500Z (6 months ago)
- Topics: reactive-programming, reactive-streams, reactiveswift, swift
- Language: Swift
- Size: 17 MB
- Stars: 2,964
- Watchers: 73
- Forks: 431
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-macos-libraries - ReactiveSwift - Streams of values over time by ReactiveCocoa group. Language: Swift. (Reactive Programming)
- awesome-system-swift - ReactiveSwift
- awesome-ios-star - ReactiveSwift - Streams of values over time by ReactiveCocoa group. (Reactive Programming / Prototyping)
- awesome-ios - ReactiveSwift - Streams of values over time by ReactiveCocoa group. (Reactive Programming / Prototyping)
README
Streams of values over time. Tailored for Swift.
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](#carthage) [![CocoaPods compatible](https://img.shields.io/cocoapods/v/ReactiveSwift.svg)](#cocoapods) [![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-orange.svg)](#swift-package-manager) [![GitHub release](https://img.shields.io/github/release/ReactiveCocoa/ReactiveSwift.svg)](https://github.com/ReactiveCocoa/ReactiveSwift/releases) ![Swift 5.1](https://img.shields.io/badge/Swift-5.1-orange.svg) ![platforms](https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-lightgrey.svg)
đźš„ [Release Roadmap](#release-roadmap)
## Getting Started
Learn about the **[Core Reactive Primitives][]** in ReactiveSwift, and **[Basic Operators][]** available offered by these primitives.
### Extended modules
Module
Repository
DescriptionReactiveCocoa
ReactiveCocoa/ReactiveCocoa
Extend Cocoa frameworks and Objective-C runtime APIs with ReactiveSwift bindings and extensions.
Loop
ReactiveCocoa/Loop
Composable unidirectional data flow with ReactiveSwift.
ReactiveSwift Composable Architecture
trading-point/reactiveswift-composable-architecture
The Pointfree Composable Architecture using ReactiveSwift instead of Combine.
## What is ReactiveSwift in a nutshell?
__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](https://en.wikipedia.org/wiki/Futures_and_promises) and [key-value observing](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html) (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.## References
1. **[API Reference][]**
1. **[API Contracts][]**
Contracts of the ReactiveSwift primitives, Best Practices with ReactiveSwift, and Guidelines on implementing custom operators.
1. **[Debugging Techniques][]**
1. **[RxSwift Migration Cheatsheet][]**
## Installation
ReactiveSwift supports macOS 10.13+, iOS 11.0+, watchOS 4.0+, tvOS 11.0+ and Linux.
#### Carthage
If you use [Carthage][] to manage your dependencies, simply add
ReactiveSwift to your `Cartfile`:```
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.
#### CocoaPods
If you use [CocoaPods][] to manage your dependencies, simply add
ReactiveSwift to your `Podfile`:```
pod 'ReactiveSwift', '~> 6.1'
```#### Swift Package Manager
If you use Swift Package Manager, simply add ReactiveSwift as a dependency
of your package in `Package.swift`:```
.package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", from: "6.1.0")
```#### Git submodule
1. Add the ReactiveSwift repository as a [submodule][] of your
application’s repository.
1. Run `git submodule update --init --recursive` from within the ReactiveCocoa folder.
1. Drag and drop `ReactiveSwift.xcodeproj` into your application’s Xcode
project or workspace.
1. On the “General” tab of your application target’s settings, add
`ReactiveSwift.framework` to the “Embedded Binaries” section.
1. If your application target does not contain Swift code at all, you should also
set the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting to “Yes”.## Playground
We also provide a Playground, so you can get used to ReactiveCocoa's operators. In order to start using it:
1. Clone the ReactiveSwift repository.
1. Retrieve the project dependencies using one of the following terminal commands from the ReactiveSwift project root directory:
- `git submodule update --init --recursive` **OR**, if you have [Carthage][] installed
- `carthage checkout`
1. Open `ReactiveSwift.xcworkspace`
1. Build `ReactiveSwift-macOS` scheme
1. Finally open the `ReactiveSwift.playground`
1. Choose `View > Show Debug Area`## Have a question?
If you need any help, please visit our [GitHub issues][] or [Stack Overflow][]. Feel free to file an issue if you do not manage to find any solution from the archives.## Release Roadmap
**Current Stable Release:**
[![GitHub release](https://img.shields.io/github/release/ReactiveCocoa/ReactiveSwift.svg)](https://github.com/ReactiveCocoa/ReactiveSwift/releases)### Plan of Record
#### ABI stability release
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.[Core Reactive Primitives]: Documentation/ReactivePrimitives.md
[Basic Operators]: Documentation/BasicOperators.md
[How does ReactiveSwift relate to RxSwift?]: Documentation/RxComparison.md
[API Contracts]: Documentation/APIContracts.md
[API Reference]: http://reactivecocoa.io/reactiveswift/docs/latest/
[Debugging Techniques]: Documentation/DebuggingTechniques.md
[RxSwift Migration Cheatsheet]: Documentation/RxCheatsheet.md
[Online Searching]: Documentation/Example.OnlineSearch.md
[_UI Examples_ playground]: https://github.com/ReactiveCocoa/ReactiveSwift/blob/master/ReactiveSwift-UIExamples.playground/Pages/ValidatingProperty.xcplaygroundpage/Contents.swift[`Action`]: Documentation/ReactivePrimitives.md#action-a-serialized-worker-with-a-preset-action
[`SignalProducer`]: Documentation/ReactivePrimitives.md#signalproducer-deferred-work-that-creates-a-stream-of-values
[`Signal`]: Documentation/ReactivePrimitives.md#signal-a-unidirectional-stream-of-events
[`Property`]: Documentation/ReactivePrimitives.md#property-an-observable-box-that-always-holds-a-value[ReactiveCocoa]: https://github.com/ReactiveCocoa/ReactiveCocoa/#readme
[Carthage]: https://github.com/Carthage/Carthage/#readme
[CocoaPods]: https://cocoapods.org/
[submodule]: https://git-scm.com/docs/git-submodule[GitHub issues]: https://github.com/ReactiveCocoa/ReactiveSwift/issues?q=is%3Aissue+label%3Aquestion+
[Stack Overflow]: http://stackoverflow.com/questions/tagged/reactive-cocoa[Looking for the Objective-C API?]: https://github.com/ReactiveCocoa/ReactiveObjC/#readme
[Still using Swift 2.x?]: https://github.com/ReactiveCocoa/ReactiveCocoa/tree/v4.0.0