Releases: ReactiveX/RxSwift
6.0.0 RC1
RxSwift 6.0.0 RC1
This is the first Release Candidate of RxSwift 6.
Note: RxSwift 6 supports Xcode 12 and Swift 5.3 and has a minimum deployment target of iOS 9.
- All
ReactiveCompatible
objects (.rx
namespace) getBinder
s for all properties for free using@dynamicMemberLookup
. - New
Infallible
object which is identical toObservable
with the guarantee of never failing. - Add variadic
drive()
andemit()
to multiple observers and relays. - New
decode(type:decoder:)
operator forObsrvableType
s ofData
. SingleEvent
is now simplyResult<Element, Swift.Error>
and methods changed accordingly (e.g.subscribe(onSuccess:onFailure:)
).- Add
ReplayRelay
. - Add
distinctUntilChanged(at keyPath:)
. - Add
UIApplication
Reactive extensions . - Rename
catchError(_:)
tocatch(_:)
. - Rename
catchErrorJustReturn(_:)
tocatchAndReturn(_:)
. - Rename
elementAt(_:)
toelement(at:)
. - Rename
retryWhen(_:)
toretry(when:)
. - Rename
takeUntil(_:)
totake(until:)
andtakeUntil(behavior:_:)
totake(until:behavior:)
. - Rename
takeWhile(_:)
totake(while:)
andtakeWhile(behavior:_:)
totake(while:behavior:)
. - Rename
take(_:)
duration overload totake(for:)
(e.g.take(for: .seconds(3))
). - Rename
skipWhile(_:)
toskip(while:)
. - Rename
takeUntil(_:)
totake(until:)
. - Rename
observeOn
andsubscribeOn
toobserve(on:)
andsubscribe(on:)
. ignoreElements()
now returnsObservable<Never>
.- Make
SharedSequence
conform toObservableConvertibleType
. - Add
onDisposed
toMaybe
,Completable
andSingle
. - Unify and optimize swizzling extensions into a single one.
- Add
DisposeBag
function builder to allow easy comma-less initialization of aDisposeBag
. - Advance support of
xcframework
s by enablingBUILD_LIBRARY_FOR_DISTRIBUTION
and cleaning up. - Many, many, many quality of life bugs and fixes.
Catalyst.1
This update is mandatory if you want to use RxSwift in Xcode 11.4 / Swift 5.2 on macOS.
- Make
NSTextView
not weak for Swift 5.2 and up. #2125 - Add
WKWebView
navigation delegate reactive extensions. #2144
Note:
- The pre-built Carthage binary was built using Xcode 11.4 / Swift 5.2
- We no longer guarantee support for Xcode 10.x. Maintaining these is counter-intuitive as they're over a year old and are ridden with bugs.
Other improvements and additions can be found in the project's CHANGELOG.md
Note:
The pre-built Carthage binary was built using Xcode 11.4.1 / Swift 5.2.2
Catalyst
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
Note:
The pre-built Carthage binary was built using Xcode 11.3.1 / Swift 5.1.3
ShaiTheBravest
ShaiTheBrave
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.
- Relays have been moved to a separate framework - RxRelay, and can be used without RxCocoa. #1924
TimeInterval
has been deprecated in favor ofDispatchTimeInterval
. For example -throttle(1.2)
would change tothrottle(.milliseconds(1200))
, whilethrottle(3)
would change tothrottle(.seconds(3))
. #1472Variable
is now entirely deprecated. #1922do
now provides additional "after" closures. For example,do(onNext:)
anddo(afterNext:)
. #1898bind(to:)
now supports multiple observers (e.g.bind(to: observer1, observer2)
). #1702- Changes the return type of
ObservableType.toArray
toSingle
. #1923 - Adds
compactMap
. #1925 - Deprecate
Completable.merge
in favor ofCompletable.zip
. #1929 #1931 - RxSwift can be built as a Static Library using Carthage 0.33 and up. #1940
Anomalies
SubjectType.SubjectObserverType
has been renamed toSubjectType.Observer
. #1950- The
S
associated type has been renamed toSubject
where applicable. #1950 - The
S
generic constraint onSharedSequence
has been renamed toSharingStrategy
. #1951 - The
E
associated type onObservableConvertibleType
andObserverType
have been renamed toElement
. #1945 - The
C
andS
associated types have been renamed toCollection
andSequence
accordingly. #1949 - Renamed
ElementType
associatedtype toElement
. #1945 - Renamed
TraitType
associatedtype toTrait
. #1945 - Make
RxMutableBox
supported on Linux in Swift 5. #1917 - Fix incorrect assignment to
Thread.threadDictionary
on Linux. #1912 combineLatest
of an empty array now completes immediately. #1879- Add
resultsSelector
missing closure labels for some overloads ofcombineLatest
&zip
.
[4,5]
Atomic.2
Atomic.1
- Adds
takeUntil(_ behavior:predicate:)
.
Anomalies
- Fixes problems with RxAtomic and thread sanitizer. #1853
- Fixes problem with passing 0 count to
Observable.range
. #1870 - Fixes Swift 5.0 warnings. #1859
- Fixes problem with RxCocoa and
DISABLE_SWIZZLING
flag. #1805 - Internal cleanups:
- Unused code deletions.
- Adds SwiftLint.
- Removes legacy Swift 3.0 conditional compilation flags.
Atomic
This 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.
- Updates deprecated
OSAtomic*
primitives to use C11 atomic primitives. - Adds
Event
,SingleEvent
,MaybeEvent
andRecorded
conditional conformance toEquatable
where theirElement
is equatable onRXTest
for clients that are using Swift >= 4.1. - Adds
string
toNSTextView
. - Consolidates per platform frameworks to multi-platform frameworks.
- Xcode 10.1 compatible.