RxSwift brings the ReactiveX Observable model to Swift for composing asynchronous streams. Companion modules add Cocoa UI bindings, relays, and test helpers.
Overview
RxSwift is a Swift port of Reactive Extensions: values and events flow through Observable sequences that subscribers can transform, combine, and observe over time. It targets a Swift-first API while keeping naming aligned with other Rx language bindings.
The design treats KVO, network calls, UI gestures, and similar sources as sequences under one abstraction, so asynchronous work can be chained with operators instead of nested callbacks. The core module has no third-party dependencies and ships as xcframeworks, Swift Package Manager packages, Carthage builds, or manual Xcode integration.
RxCocoa layers Apple platform integrations such as control properties and shared sequences for iOS, macOS, watchOS, and tvOS UI code. RxRelay offers thread-safe relay types around subjects, while RxTest and RxBlocking support unit tests and synchronous blocking waits in test scenarios.
Documentation cross-links to ReactiveX.io for general concepts, and the project positions itself alongside Combine and ReactiveSwift for teams comparing reactive approaches on Apple platforms.
Key features
- Observable streams and Rx operators
- RxCocoa UI and Cocoa bindings
- Single, Completable, Driver traits
- PublishRelay and BehaviorRelay wrappers
- RxTest and RxBlocking test support
- XCFramework and SwiftPM distribution
- Composable async event pipelines
- No external runtime dependencies
Use cases
- Binding UI controls to data streams
- Debouncing search and user input
- Coordinating network and UI updates
- Testing reactive view models
- Unifying async callbacks as sequences