Reactive Programming in Swift
This release removes UIWebView Reactive Extensions due to Apple's hard deprecation, starting April 2020 which also allows RxSwift to be used in Catalyst apps. #2062
Other improvements and additions can be found in the project's CHANGELOG.md
The pre-built Carthage binary was built using Xcode 11.3.1 / Swift 5.1.3
NOTE: This release is only relevant to Carthage users (#1960), there are no code changes between RxSwift 5.0.0 and 5.0.1.
RxSwift 5 is a mostly source-compatible release targeting the Swift 5 compiler.
Xcode 10.2 is the minimum supported version (or Swift 5 on Linux).
If you're using Xcode 10.1 and below, please use RxSwift 4.5.
TimeInterval
has been deprecated in favor of DispatchTimeInterval
. For example - throttle(1.2)
would change to throttle(.milliseconds(1200))
, while throttle(3)
would change to throttle(.seconds(3))
. #1472Variable
is now entirely deprecated. #1922do
now provides additional "after" closures. For example, do(onNext:)
and do(afterNext:)
. #1898bind(to:)
now supports multiple observers (e.g. bind(to: observer1, observer2)
). #1702ObservableType.toArray
to Single
. #1923compactMap
. #1925Completable.merge
in favor of Completable.zip
. #1929 #1931SubjectType.SubjectObserverType
has been renamed to SubjectType.Observer
. #1950S
associated type has been renamed to Subject
where applicable. #1950S
generic constraint on SharedSequence
has been renamed to SharingStrategy
. #1951E
associated type on ObservableConvertibleType
and ObserverType
have been renamed to Element
. #1945C
and S
associated types have been renamed to Collection
and Sequence
accordingly. #1949ElementType
associatedtype to Element
. #1945TraitType
associatedtype to Trait
. #1945RxMutableBox
supported on Linux in Swift 5. #1917Thread.threadDictionary
on Linux. #1912combineLatest
of an empty array now completes immediately. #1879resultsSelector
missing closure labels for some overloads of combineLatest
& zip
.UISearchBar.setDelegate()
.UIView.rx.backgroundColor
Binder. #1888DelegateProxy
main thread validation. #1882first
operator to ObservableType
. #1886takeUntil(_ behavior:predicate:)
.Observable.range
. #1870DISABLE_SWIZZLING
flag. #1805This relase introduces new framework RxAtomic
that enables using C11 atomic primities in RxSwift as a replacement for deprecated OSAtomic*
functions.
Carthage users will probably need to include this framework manually.
OSAtomic*
primitives to use C11 atomic primitives.Event
, SingleEvent
, MaybeEvent
and Recorded
conditional conformance to Equatable
where their Element
is equatable on RXTest
for clients that are using Swift >= 4.1.string
to NSTextView
.observeOn
operator. #1778UISearchBar.text
property not triggering update when cancel button is tapped. #1714insert
extension to collect and add multiple disposables to DisposeBag
.scan(into:accumulator:)
.queuePriority
parameter (defaults to .normal
) to OperationQueueScheduler
.customCaptureSubscriptionCallstack
hook to allow custom subscription callstacks to be generated.Variable
from Playground, Example projects and Tests.XCTAssertRecordedElements
to XCTest+Rx
.UICollectionView
extensions:
prefetchItems
UITableView
extensions:
prefetchRows
cancelPrefetchingForRows
UISegmentedControlExtensions
:
titleForSegment(at:)
imageForSegment(at:)
Maybe.ifEmpty(default:)
operator.Maybe.ifEmpty(switchTo:)
operator.Maybe.catchErrorJustReturn(_:)
operator.Single.flatMapMaybe(_:)
operator.Single.flatMapCompletable(_:)
operator.Single.zip(_:)
operator.Single.catchErrorJustReturn(_:)
operator.Single.asMaybe(_:)
operator.Single.asCompletable(_:)
operator.UISegmentedControl.enabled(forSegmentAt:)
in favor of UISegmentedControl.enabledForSegment(at:)
.