Reactive Programming in Swift
Infallible
async/await
bridgeBooleanDisposable
Table/CollectionViewDelegateProxy
Infallible
helpers for CombineLatest
You can now use await
on Observable
-conforming objects (as well as Driver
, Signal
, Infallible
, Single
, Completable
) using the following syntax:
do {
for try await value in observable.values {
print(value) // Next event
}
// Completed here
} catch {
// Error event
print("An error occurred:", error.localizedDescription)
}
Check out the full documentation for additional information: https://github.com/ReactiveX/RxSwift/blob/main/Documentation/SwiftConcurrency.md
RxSwift 5.1.3 is a patch release to provide support for Xcode 12.5 for those who are still using RxSwift 5.x. We recommend upgrading to RxSwift 6.x as soon as possible, regardless.
Support Xcode 12.5
Thanks to @iDevid, @marcelofabri, @faimin and @danielt1263 for their contributions to this release 🤘 💯
Driver
Note: It is extremely rare to ship a breaking change in a patch release, but this is a relatively fresh feature with unusual circumstances. For the full story, see #2290.
subscribe(with:onNext:onError:onCompleted:onDisposed:)
alternatives to withUnretained
. This exists for all traits and types: Observable
, Driver
, Signal
, Infallible
, Completable
, Single
, Maybe
#2290Reactive
now supports structs and value-types again, with the dynamic look-up specifically dealing with AnyObject
s #2285RxCocoa
(Drag in new RxCocoaRuntime.xcframework alongside RxCocoa
)MaybeEvent
and CompletableEvent
#2271 #2272RxCocoa
podspec #2281httpBody
, regardless of HTTP Method #2288
To get a glimpse of what this new major version packs, check out the following blog post: What's new in RxSwift 6
Note: RxSwift 6 supports Xcode 12 and Swift 5.3 and has a minimum deployment target of iOS 9.
ReactiveCompatible
objects (.rx
namespace) get Binder
s for all properties for free using @dynamicMemberLookup
.Infallible
object which is identical to Observable
with the guarantee of never failing.drive()
and emit()
to multiple observers and relays.decode(type:decoder:)
operator for ObsrvableType
s of Data
.SingleEvent
is now simply Result<Element, Swift.Error>
and methods changed accordingly (e.g. subscribe(onSuccess:onFailure:)
).ReplayRelay
.withUnretained(_:)
operator.distinctUntilChanged(at keyPath:)
.UIApplication
Reactive extensions .catchError(_:)
to catch(_:)
.catchErrorJustReturn(_:)
to catchAndReturn(_:)
.elementAt(_:)
to element(at:)
.retryWhen(_:)
to retry(when:)
.takeUntil(_:)
to take(until:)
and takeUntil(behavior:_:)
to take(until:behavior:)
.takeWhile(_:)
to take(while:)
and takeWhile(behavior:_:)
to take(while:behavior:)
.take(_:)
duration overload to take(for:)
(e.g. take(for: .seconds(3))
).skipWhile(_:)
to skip(while:)
.takeUntil(_:)
to take(until:)
.observeOn
and subscribeOn
to observe(on:)
and subscribe(on:)
.ignoreElements()
now returns Observable<Never>
.SharedSequence
conform to ObservableConvertibleType
.onDisposed
to Maybe
, Completable
and Single
.DisposeBag
function builder to allow easy comma-less initialization of a DisposeBag
.BUILD_LIBRARY_FOR_DISTRIBUTION
and cleaning up.This is the second and (probably) final Release Candidate of RxSwift 6. The official 6.0.0 should be released in the upcoming weeks and should be mostly identical to this.
Note: RxSwift 6 supports Xcode 12 and Swift 5.3 and has a minimum deployment target of iOS 9.
Everything in RC1, plus:
Infallible
trait.URLSession
logging settings to a more appropriate URLSession.rx.shouldLogRequest
configurable closure.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.
ReactiveCompatible
objects (.rx
namespace) get Binder
s for all properties for free using @dynamicMemberLookup
.Infallible
object which is identical to Observable
with the guarantee of never failing.drive()
and emit()
to multiple observers and relays.decode(type:decoder:)
operator for ObsrvableType
s of Data
.SingleEvent
is now simply Result<Element, Swift.Error>
and methods changed accordingly (e.g. subscribe(onSuccess:onFailure:)
).ReplayRelay
.distinctUntilChanged(at keyPath:)
.UIApplication
Reactive extensions .catchError(_:)
to catch(_:)
.catchErrorJustReturn(_:)
to catchAndReturn(_:)
.elementAt(_:)
to element(at:)
.retryWhen(_:)
to retry(when:)
.takeUntil(_:)
to take(until:)
and takeUntil(behavior:_:)
to take(until:behavior:)
.takeWhile(_:)
to take(while:)
and takeWhile(behavior:_:)
to take(while:behavior:)
.take(_:)
duration overload to take(for:)
(e.g. take(for: .seconds(3))
).skipWhile(_:)
to skip(while:)
.takeUntil(_:)
to take(until:)
.observeOn
and subscribeOn
to observe(on:)
and subscribe(on:)
.ignoreElements()
now returns Observable<Never>
.SharedSequence
conform to ObservableConvertibleType
.onDisposed
to Maybe
, Completable
and Single
.DisposeBag
function builder to allow easy comma-less initialization of a DisposeBag
.xcframework
s by enabling BUILD_LIBRARY_FOR_DISTRIBUTION
and cleaning up.This update is mandatory if you want to use RxSwift in Xcode 11.4 / Swift 5.2 on macOS.
NSTextView
not weak for Swift 5.2 and up. #2125WKWebView
navigation delegate reactive extensions. #2144Note:
Other improvements and additions can be found in the project's CHANGELOG.md
The pre-built Carthage binary was built using Xcode 11.4.1 / Swift 5.2.2