Rx is a generic abstraction of computation expressed through Observable Element interface,

Overview

RxSwift Logo
Build Status Supported Platforms: iOS, macOS, tvOS, watchOS & Linux

Rx is a generic abstraction of computation expressed through Observable interface, which lets you broadcast and subscribe to values and other events from an Observable stream.

RxSwift is the Swift-specific implementation of the Reactive Extensions standard.

RxSwift Observable Example of a price constantly changing and updating the app's UI

While this version aims to stay true to the original spirit and naming conventions of Rx, this projects also aims to provide a true Swift-first API for Rx APIs.

Cross platform documentation can be found on ReactiveX.io.

Like other Rx implementation, RxSwift's intention is to enable easy composition of asynchronous operations and streams of data in the form of Observable objects and a suite of methods to transform and compose these pieces of asynchronous work.

KVO observation, async operations, UI Events and other streams of data are all unified under abstraction of sequence. This is the reason why Rx is so simple, elegant and powerful.

I came here because I want to ...

... understand
... install
... hack around
... interact
... compare
... understand the structure

RxSwift is as compositional as the asynchronous work it drives. The core unit is RxSwift itself, while other dependencies can be added for UI Work, testing, and more.

It comprises five separate components depending on each other in the following way:

┌──────────────┐    ┌──────────────┐
│   RxCocoa    ├────▶   RxRelay    │
└───────┬──────┘    └──────┬───────┘
        │                  │        
┌───────▼──────────────────▼───────┐
│             RxSwift              │
└───────▲──────────────────▲───────┘
        │                  │        
┌───────┴──────┐    ┌──────┴───────┐
│    RxTest    │    │  RxBlocking  │
└──────────────┘    └──────────────┘
  • RxSwift: The core of RxSwift, providing the Rx standard as (mostly) defined by ReactiveX. It has no other dependencies.
  • RxCocoa: Provides Cocoa-specific capabilities for general iOS/macOS/watchOS & tvOS app development, such as Shared Sequences, Traits, and much more. It depends on both RxSwift and RxRelay.
  • RxRelay: Provides PublishRelay, BehaviorRelay and ReplayRelay, three simple wrappers around Subjects. It depends on RxSwift.
  • RxTest and RxBlocking: Provides testing capabilities for Rx-based systems. It depends on RxSwift.

Usage

Here's an example In Action
Define search for GitHub repositories ...
let searchResults = searchBar.rx.text.orEmpty
    .throttle(.milliseconds(300), scheduler: MainScheduler.instance)
    .distinctUntilChanged()
    .flatMapLatest { query -> Observable<[Repository]> in
        if query.isEmpty {
            return .just([])
        }
        return searchGitHub(query)
            .catchAndReturn([])
    }
    .observe(on: MainScheduler.instance)
... then bind the results to your tableview
searchResults
    .bind(to: tableView.rx.items(cellIdentifier: "Cell")) {
        (index, repository: Repository, cell) in
        cell.textLabel?.text = repository.name
        cell.detailTextLabel?.text = repository.url
    }
    .disposed(by: disposeBag)

Requirements

  • Xcode 12.x
  • Swift 5.x

For Xcode 11 and below, use RxSwift 5.x.

Installation

RxSwift doesn't contain any external dependencies.

These are currently the supported installation options:

Manual

Open Rx.xcworkspace, choose RxExample and hit run. This method will build everything and run the sample app

CocoaPods

# Podfile
use_frameworks!

target 'YOUR_TARGET_NAME' do
    pod 'RxSwift', '6.2.0'
    pod 'RxCocoa', '6.2.0'
end

# RxTest and RxBlocking make the most sense in the context of unit/integration tests
target 'YOUR_TESTING_TARGET' do
    pod 'RxBlocking', '6.2.0'
    pod 'RxTest', '6.2.0'
end

Replace YOUR_TARGET_NAME and then, in the Podfile directory, type:

$ pod install

XCFrameworks

Each release starting with RxSwift 6 includes *.xcframework framework binaries.

Simply drag the needed framework binaries to your Frameworks, Libraries, and Embedded Content section under your target's General tab.

Note: If you're using RxCocoa, be sure to also drag RxCocoaRuntime.xcframework before importing RxCocoa.

XCFrameworks instructions

Carthage

Add this to Cartfile

github "ReactiveX/RxSwift" "6.2.0"
$ carthage update

Carthage as a Static Library

Carthage defaults to building RxSwift as a Dynamic Library.

If you wish to build RxSwift as a Static Library using Carthage you may use the script below to manually modify the framework type before building with Carthage:

carthage update RxSwift --platform iOS --no-build
sed -i -e 's/MACH_O_TYPE = mh_dylib/MACH_O_TYPE = staticlib/g' Carthage/Checkouts/RxSwift/Rx.xcodeproj/project.pbxproj
carthage build RxSwift --platform iOS

Swift Package Manager

Note: There is a critical cross-dependency bug affecting many projects including RxSwift in Swift Package Manager. We've filed a bug (SR-12303) in early 2020 but have no answer yet. Your mileage may vary. A partial workaround can be found here.

Create a Package.swift file.

// swift-tools-version:5.0

import PackageDescription

let package = Package(
  name: "RxTestProject",
  dependencies: [
    .package(url: "https://github.com/ReactiveX/RxSwift.git", .exact("6.2.0"))
  ],
  targets: [
    .target(name: "RxTestProject", dependencies: ["RxSwift", "RxCocoa"])
  ]
)
$ swift build

To build or test a module with RxTest dependency, set TEST=1.

$ TEST=1 swift test

Manually using git submodules

  • Add RxSwift as a submodule
$ git submodule add [email protected]:ReactiveX/RxSwift.git
  • Drag Rx.xcodeproj into Project Navigator
  • Go to Project > Targets > Build Phases > Link Binary With Libraries, click + and select RxSwift, RxCocoa and RxRelay targets

References

Comments
  • ITMS-90809: Deprecated API Usage - UIWebView

    ITMS-90809: Deprecated API Usage - UIWebView

    We identified one or more issues with a recent delivery for your app, APP_NAME. Your delivery was successful, but you may wish to correct the following issues in your next delivery:

    ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.

    After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to App Store Connect.

    opened by voyage11 108
  • 👷‍♂️👷‍♀️RxSwift 5 Pre-Release discussion

    👷‍♂️👷‍♀️RxSwift 5 Pre-Release discussion

    Hey @kzaher & others -

    Since RxSwift 5 is around the corner, I took the liberty of making a list of PRs/Issues that were delayed for RxSwift 5.

    The goal here is to see if:

    • Any of them are easy enough to get into RxSwift 5; or,
    • Any are hard to add but are needed for RxSwift 5 (and worth delaying the release for).

    Since this is a major version bump we should take some time to think about any breaking changes we might want to introduce.

    This is what I gathered so far:

    • [x] doAfter* overloads to match RxJava. #1898 @freak4pc
    • [x] Move Relays to their own framework. #1924 @freak4pc
    • [x] Allow binding to multiple observers. #1702 @freak4pc
    • [x] Using DispatchTimeInterval instead of TimeInterval for Schedulers. #1472 @kzaher
    • [x] combineLatest of an empty array completes immediately. #1879
    • [x] Change toArray to return Single. #1923 @freak4pc
    • [x] Complete once any Completable completes. #1674~
    • [x] Decide how to deal with soft-deprecated things (Variable, global RxTest things) @freak4pc #19223
    • [x] Add compactMap #1925. @hmlongco
    • [x] Fix take amount vs take interval ambiguity. @freak4pc (blocked by #1472)
    • [x] Add resultsSelector missing closure labels for some overloads of combineLatest & zip.
    • [x] Deprecate Completable.merge in favor of Completable.zip. #1929 #1931
    • [x] Carthage Static Library Support. #1940

    Generic Renames Checklist:

    • [x] E and ElementType to Element, TraitType to Trait. #1945
    • [x] R to Result #1948
    • [x] C to Collection #1949
    • [x] S to Sequence #1949
    • [x] CompatibleType to ReactiveBase #1947
    • [x] S to SharingStrategy #1951
    • [x] S to Subject #1950
    • [x] SubjectType.SubjectObserverType to SubjectType.Observer #1950
    • [x] O to Observer #1952
    • [x] O to Observable

    If there are any other PRs/Issues you feel should participate in this discussion, please add a comment below.

    rxswift 5.0 
    opened by freak4pc 67
  • Revisit typed errors?

    Revisit typed errors?

    We discussed typed errors here on github a while back. Maybe you've discussed on slack as well. I thought maybe it is time to revisit this question.

    Unambiguous API The user of your API doesn't need to make assumptions. She/he will know what errors your API produces. So will your unit tests.

    Let the compiler do the job Type safe languages have the benefit of letting the compiler do work that you normally have to unit test. Does PushHandler return any other error than PushHandlerError? No need to unit test mundane stuff like that if the compiler can tell you right away.

    Sequences that can't fail Some sequences can't fail and that is valuable information when dealing with them as it makes code less engineered and less complex.

    ~~

    RAC has a great writeup on how working with typed errors is like .

    Would it be possible to change the API in such way that it is possible to opt-in to typed errors?

    I love typed errors, but hey, maybe that's just me :)

    waiting for Apple 
    opened by hfossli 60
  • Add support for static frameworks in Carthage

    Add support for static frameworks in Carthage

    Short description of the issue:

    RxSwift currently includes only dynamic frameworks when building with Carthage. As of Carthage 0.30.0, Carthage is capable of building static frameworks without the use of external tools. This can be achieved by duplicating the current set of RxSwift targets and changing the Mach-O Type field to Static Library instead of Dynamic Framework. The targets still build as static frameworks, however. The two sets of targets can co-exist and are output to different directories at build time (for example Carthage/Build/iOS for the dynamic framework and Carthage/Build/iOS/Static for the static framework).

    It's my preference to use the static frameworks in my iOS applications instead of dynamic frameworks in order to improve launch times by reducing the number of frameworks that I am consuming that require dynamic linking.

    I currently fork RxSwift and implement this on my fork. I'd be happy to contribute it back via pull request if the interest is there to add it to RxSwift.

    Expected outcome:

    Carthage builds produce static frameworks alongside the dynamic frameworks.

    What actually happens:

    Carthage is currently only producing dynamic frameworks for RxSwift when running carthage update.

    Platform/Environment

    • [x] iOS
    • [x] macOS
    • [x] tvOS
    • [x] watchOS
    • [ ] playgrounds

    How easy is to reproduce? (chances of successful reproduce after running the self contained code)

    • [x] easy, 100% repro
    • [ ] sometimes, 10%-100%
    • [ ] hard, 2% - 10%
    • [ ] extremely hard, %0 - 2%

    Xcode version:

      Xcode 10.0
    

    :warning: Fields below are optional for general issues or in case those questions aren't related to your issue, but filling them out will increase the chances of getting your issue resolved. :warning:

    Installation method:

    • [ ] CocoaPods
    • [x] Carthage
    • [ ] Git submodules

    I have multiple versions of Xcode installed: (so we can know if this is a potential cause of your issue)

    • [ ] yes (which ones)
    • [x] no

    Level of RxSwift knowledge: (this is so we can understand your level of knowledge and formulate the response in an appropriate manner)

    • [ ] just starting
    • [ ] I have a small code base
    • [x] I have a significant code base
    help wanted 
    opened by mfcollins3 57
  • Runtime errors with Xcode 9.3 / Swift 4.1

    Runtime errors with Xcode 9.3 / Swift 4.1

    Short description of the issue:

    combineLatest/zip operators fail at runtime with latest Xcode 9.3b1 / Swift 4.1 running against iOS 11.3 OR 11.2.

    Expected outcome:

    combineLatest/zip operators execute without crashing.

    What actually happens:

    Intermittent bad access errors.

    Self contained code example that reproduces the issue:

    Run the iOS Test Suite with Xcode 9.3b1.

    It seems disabling the tests in Observable+CombineLatestTests+arity.swift, Observable+ZipTests.swift, and Observable+ZipTests+arity.swift will allow the test suite to pass, so I assume the focus will be on the zip/combineLatest operators.

    RxSwift/RxCocoa/RxBlocking/RxTest version/commit

    RxSwift 4.1.1

    Platform/Environment

    • [x] iOS
    • [ ] macOS
    • [ ] tvOS
    • [ ] watchOS
    • [ ] playgrounds

    How easy is to reproduce? (chances of successful reproduce after running the self contained code)

    • [x] easy, 100% repro
    • [ ] sometimes, 10%-100%
    • [ ] hard, 2% - 10%
    • [ ] extremely hard, %0 - 2%

    Xcode version:

    Xcode 9.3b1

    opened by tcldr 46
  • Removal of the 'rx_' prefix

    Removal of the 'rx_' prefix

    What I was wondering is if there was a possibility of getting rid of the rx_ prefix. I'm not gonna lie, I think it looks out of place in the Swift world. Thus this is really only of 'cosmetic' nature and not particularly high priority.

    Either way, the pros of the rx_ prefix is definitely discoverability and clarity. So a new naming convention would need to be at least similarly discoverable and clear.

    I was for example thinking about observable, so rx_text would become observableText. In my opinion, this is clear enough and looks a lot nicer.

    Anyways, I just opened this issue to figure out what everyone else thinks about this. Do you prefer the rx_ prefix? If not, what naming convention would you propose?

    enhancement question 
    opened by lbrndnr 45
  • Test target does not build when RxCocoa Swift Package is used

    Test target does not build when RxCocoa Swift Package is used

    Short description of the issue:

    When RxCocoa is used in a project in Xcode 11, and it is imported as RxSwift package, unit tests for that project do not build, with following error:

    missing required module 'RxCocoaRuntime'
    

    I am not an expert on Swift Packages, just starting with it. I see RxCocoaRuntime is declared as a target in Package.swift, and RxCocoa depends on it. But it is not declared as a product. This may be also Xcode's issue. But I don't have issues with other dependencies.

    Expected outcome:

    Tests build and are executed.

    What actually happens:

    Build fails.

    Self contained code example that reproduces the issue:

    Sample, minimal project: https://github.com/michallaskowski/RxCocoaTestsIssue

    RxSwift/RxCocoa/RxBlocking/RxTest version/commit

    Current master, commit 6b2a406

    Platform/Environment

    • [x] iOS
    • [ ] macOS
    • [ ] tvOS
    • [ ] watchOS
    • [ ] playgrounds

    How easy is to reproduce? (chances of successful reproduce after running the self contained code)

    • [x] easy, 100% repro
    • [ ] sometimes, 10%-100%
    • [ ] hard, 2% - 10%
    • [ ] extremely hard, %0 - 2%

    Xcode version:

    Xcode 11 beta 7, tested also with beta 6

    :warning: Fields below are optional for general issues or in case those questions aren't related to your issue, but filling them out will increase the chances of getting your issue resolved. :warning:

    Installation method:

    • [ ] CocoaPods
    • [ ] Carthage
    • [ ] Git submodules

    other - Swift Packages :)

    I have multiple versions of Xcode installed: (so we can know if this is a potential cause of your issue)

    • [x] yes (Xcode 10.1, Xcode 10.2.1)
    • [ ] no

    Level of RxSwift knowledge: (this is so we can understand your level of knowledge and formulate the response in an appropriate manner)

    • [ ] just starting
    • [ ] I have a small code base
    • [x] I have a significant code base
    opened by michallaskowski 43
  • Use Combine Framework under the hood or provide adapters

    Use Combine Framework under the hood or provide adapters

    Short description of the issue:

    iOS 13/mac OS 10.15 come with built-in reactive programming framework: https://developer.apple.com/documentation/combine https://developer.apple.com/documentation/combine/publisher

    Expected outcome:

    RxSwift should be updated to use the built-in primitives where possible, or at least provide a set of adapters.

    What actually happens:

    RxSwift doesn't use Combine framework

    Platform/Environment

    • [x] iOS
    • [x] macOS
    • [x] tvOS
    • [x] watchOS
    • [x] playgrounds

    Xcode version:

    11.0+
    
    opened by petejkim 43
  • Build error 65 with Xcode 10.2 (Swift 5)

    Build error 65 with Xcode 10.2 (Swift 5)

    Short description of the issue:

    RxSwift 4.4.2 fails to build with:

    • Xcode 10.2 (10E125)
    • Carthage 0.32.0
    • iOS platform

    Expected outcome:

    RxSwift builds.

    What actually happens:

    carthage update RxSwift --platform iOS --no-use-binaries
    

    Console output:

    *** Fetching RxSwift
    *** Checking out RxSwift at "4.4.2"
    *** xcodebuild output can be found in /var/folders/3s/n9cx3jx57ms9pcrn7yc14sl00000gn/T/carthage-xcodebuild.2K3DkT.log
    *** Building scheme "RxAtomic" in Rx.xcworkspace
    *** Building scheme "RxCocoa" in Rx.xcworkspace
    Build Failed
        Task failed with exit code 65:
        /usr/bin/xcrun xcodebuild -workspace .../Carthage/Checkouts/RxSwift/Rx.xcworkspace -scheme RxCocoa -configuration Release -derivedDataPath .../Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/RxSwift/4.4.2 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/3s/n9cx3jx57ms9pcrn7yc14sl00000gn/T/RxSwift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in .../Carthage/Checkouts/RxSwift)
    
    This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/3s/n9cx3jx57ms9pcrn7yc14sl00000gn/T/carthage-xcodebuild.2K3DkT.log
    

    Log file contents:

    ...
    
    Linting Swift files in current working directory
    Linting 'Cancelable.swift' (1/283)
    Could not cast value of type 'Swift.Int64' (0x1032abf80) to 'Swift.String' (0x1032b24d8).
    .../Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/RxSwift/4.4.2/Build/Intermediates.noindex/ArchiveIntermediates/RxCocoa/IntermediateBuildFilesPath/Rx.build/Release-iphoneos/RxSwift.build/Script-A21F589121E109AD0051AEA2.sh: line 6: 72924 Abort trap: 6           swiftlint
    Command PhaseScriptExecution failed with a nonzero exit code
    
    Ditto .../Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/RxSwift/4.4.2/Build/Intermediates.noindex/ArchiveIntermediates/RxCocoa/IntermediateBuildFilesPath/Rx.build/Release-iphoneos/RxSwift.build/module.modulemap .../Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/RxSwift/4.4.2/Build/Intermediates.noindex/ArchiveIntermediates/RxCocoa/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/RxSwift.framework/Modules/module.modulemap (in target: RxSwift)
        cd .../Carthage/Checkouts/RxSwift
        builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks .../Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/RxSwift/4.4.2/Build/Intermediates.noindex/ArchiveIntermediates/RxCocoa/IntermediateBuildFilesPath/Rx.build/Release-iphoneos/RxSwift.build/module.modulemap .../Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/RxSwift/4.4.2/Build/Intermediates.noindex/ArchiveIntermediates/RxCocoa/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/RxSwift.framework/Modules
    
    ** ARCHIVE FAILED **
    
    
    The following build commands failed:
            PhaseScriptExecution SwiftLint .../Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/RxSwift/4.4.2/Build/Intermediates.noindex/ArchiveIntermediates/RxCocoa/IntermediateBuildFilesPath/Rx.build/Release-iphoneos/RxSwift.build/Script-A21F589121E109AD0051AEA2.sh
    (1 failure)
    

    Self contained code example that reproduces the issue:

    // No Swift code needed.  Just try to build RxSwift after upgrading Xcode to 10.2
    

    RxSwift/RxCocoa/RxBlocking/RxTest version/commit

    4.4.2
    

    Platform/Environment

    • [x] iOS
    • [ ] macOS
    • [ ] tvOS
    • [ ] watchOS
    • [ ] playgrounds

    How easy is to reproduce? (chances of successful reproduce after running the self contained code)

    • [x] easy, 100% repro
    • [ ] sometimes, 10%-100%
    • [ ] hard, 2% - 10%
    • [ ] extremely hard, %0 - 2%

    Xcode version:

    10.2 (10E125)
    

    Installation method:

    • [ ] CocoaPods
    • [x] Carthage
    • [ ] Git submodules

    I have multiple versions of Xcode installed:

    • [ ] yes (which ones)
    • [x] no

    Level of RxSwift knowledge:

    • [ ] just starting
    • [x] I have a small code base
    • [ ] I have a significant code base
    opened by courteouselk 37
  • Application crash sending `text` selector to RxTableViewDelegateProxy or RxCollectionViewDelegateProxy

    Application crash sending `text` selector to RxTableViewDelegateProxy or RxCollectionViewDelegateProxy

    Short description of the issue:

    We're seeing a crash among our userbase that is happening with alarming frequency however we have been unable to reproduce it or identify the root cause. A slack discussion was started here among 2 of us that are seeing this problem but we wanted to post here with the hopes that someone else may have an idea about something to look at.

    This is the stack trace/crash:

    -[RxCocoa.RxTableViewDelegateProxy text]: unrecognized selector sent to instance 0x28378a0d0
    
    Fatal Exception: NSInvalidArgumentException
    0  CoreFoundation                 0x99288 __exceptionPreprocess
    1  libobjc.A.dylib                0x16744 objc_exception_throw
    2  CoreFoundation                 0x176fc4 +[NSObject(NSObject) _copyDescription]
    3  CoreFoundation                 0x2de98 ___forwarding___
    4  CoreFoundation                 0x2cf70 _CF_forwarding_prep_0
    5  ContextKitExtraction           0x59ec +[CKContextContentProviderUIScene _bestVisibleStringForView:usingExecutor:]
    6  ContextKitExtraction           0x4d7c +[CKContextContentProviderUIScene _donateContentsOfWindow:usingExecutor:withOptions:]
    7  ContextKitExtraction           0x48fc __78+[CKContextContentProviderUIScene extractFromScene:usingExecutor:withOptions:]_block_invoke
    8  ContextKitExtraction           0x54ac __64-[CKContextExecutor addWorkItemToQueue:withWorkItem:andContext:]_block_invoke
    9  libdispatch.dylib              0x1e6c _dispatch_call_block_and_release
    10 libdispatch.dylib              0x3a30 _dispatch_client_callout
    11 libdispatch.dylib              0x11fa4 _dispatch_main_queue_drain
    12 libdispatch.dylib              0x11b98 _dispatch_main_queue_callback_4CF
    13 CoreFoundation                 0x51800 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
    14 CoreFoundation                 0xb704 __CFRunLoopRun
    15 CoreFoundation                 0x1ebc8 CFRunLoopRunSpecific
    16 GraphicsServices               0x1374 GSEventRunModal
    17 UIKitCore                      0x514648 -[UIApplication _run]
    18 UIKitCore                      0x295d90 UIApplicationMain
    19 <OurAppName>                   0x2b144c main + 20 (main.swift:20)
    20 ???                            0x106badce4 (Missing)
    

    I have scoured our code to see if we were somehow sending a text selector to anything in a weird way, this is not the case. Our app is large and uses tables in many screens but I haven't found any misuse of rx.tems.

    Here are the pertinent facts I've been able to collect about the problem:

    1. iOS 15.x.x only. We have users going back all the way to iOS 10.0 and no one experiences the crash other than iOS 15 users. We have a large user base so this shows up enough for us to have a large sample (thousands of crash events)
    2. SDK doesn't matter. I have viewed crashes going back to before we upgraded to Xcode 13 (using Xcode 12). These users had the crash as well (running on iOS 15).
    3. The only API change of note in tables/collection views in iOS15 is the automatic prefetching which doesn't involve code changes necessarily or invoke a text selector anywhere.
    4. The stack makes it clear that whatever the source is, it's going through dynamic dispatch / objc_msgSend and being marshaled to the ui thread or called from the ui thread using dispatch.async as it unwinds the stack out to the runloop to invoke this invalid selector on the proxy.

    This crash is alarming because it seems to only occur on iOS15. Users from previous versions of iOS do not exhibit this problem. We haven't been able to determine if this is a bug in iOS, a bug in RxSwift or a bug in our usage of it. The os-specific nature of it makes me wonder if there's an iOS bug or a bug in the RxSwift framework that just hasn't come to light yet.

    Any insights would be greatly appreciated.

    Expected outcome:

    No crashes

    What actually happens:

    Crash

    Self contained code example that reproduces the issue:

    I wish I had one or I'd be able to identify the problem :(

    RxSwift/RxCocoa/RxBlocking/RxTest version/commit

    RxSwift 6.2.0 - https://github.com/ReactiveX/RxSwift/commit/7c17a6ccca06b5c107cfa4284e634562ddaf5951

    Platform/Environment

    • [x] iOS
    • [ ] macOS
    • [ ] tvOS
    • [ ] watchOS
    • [ ] playgrounds

    How easy is to reproduce? (chances of successful reproduce after running the self contained code)

    About 3% of our userbase is experiencing this. This includes users of other versions of iOS however that do not experience the issue at all.

    Xcode version:

    Xcode 13.2.1(13C100) although as stated it seems Xcode 12.4 was used at the time this first started showing up but before we noticed it.
    

    Installation method:

    • [x] CocoaPods
    • [ ] Carthage
    • [ ] Git submodules

    I have multiple versions of Xcode installed: (so we can know if this is a potential cause of your issue)

    • [ ] yes (which ones)
    • [x] no

    Level of RxSwift knowledge: (this is so we can understand your level of knowledge and formulate the response in an appropriate manner)

    • [ ] just starting
    • [ ] I have a small code base
    • [x] I have a significant code base
    opened by SlashDevSlashGnoll 36
  • Build fails on Linux with Swift 5.0

    Build fails on Linux with Swift 5.0

    On Linux with Swift 5.0 release and RxSwift at cce95dd704bc08cd3d69c087a05a6fc3118e2722, doing a swift build fails:

    /home/keith/dev/RxSwift/Sources/RxSwift/Platform.Linux.swift:26:27: error: cannot assign to property: 'threadDictionary' setter is inaccessible
                currentThread.threadDictionary = threadDictionary
                ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
    
    opened by keith 35
  • TakeUntil Different Working from Docs

    TakeUntil Different Working from Docs

    :warning: If you don't have something to report in the following format, it will probably be easier and faster to ask in the slack channel first. :warning:

    :warning: Please take you time to fill in the fields below. If we aren't provided with this basic information about your issue we probably won't be able to help you and there won't be much we can do except to close the issue :( :warning:

    If you still want to report issue, please delete above statements before submitting an issue.

    Short description of the issue: TakeUntil Docs Says

    If this second Observable emits an item or sends a termination notification, the Observable returned by TakeUntil stops mirroring the source Observable and terminates

    But if Second Observable terminates, Source observer still can emit the item. description here

    Expected outcome:

    onNext("A")
    onNext("B")
    

    What actually happens:

    onNext("A")
    onNext("B")
    onNext("C")
    

    Self contained code example that reproduces the issue:

    
    let subject = PublishSubject<String>()
    let trigger = PublishSubject<String>()
            
            subject
                .take(until: trigger)
                .subscribe(onNext: {
                    print($0)
                })
                .disposed(by: disposBag)
            
            subject.onNext("A")
            subject.onNext("B")
            trigger.onCompleted()
            subject.onNext("C")
    

    RxSwift/RxCocoa/RxBlocking/RxTest version/commit 6.0.0 version or commit here

    Platform/Environment

    • [x] iOS
    • [ ] macOS
    • [ ] tvOS
    • [ ] watchOS
    • [ ] playgrounds

    How easy is to reproduce? (chances of successful reproduce after running the self contained code)

    • [x] easy, 100% repro
    • [ ] sometimes, 10%-100%
    • [ ] hard, 2% - 10%
    • [ ] extremely hard, %0 - 2%

    Xcode version:

      Xcode version goes here
    

    :warning: Fields below are optional for general issues or in case those questions aren't related to your issue, but filling them out will increase the chances of getting your issue resolved. :warning:

    Installation method:

    • [ ] CocoaPods
    • [ ] Carthage
    • [ ] Git submodules

    I have multiple versions of Xcode installed: (so we can know if this is a potential cause of your issue)

    • [ ] yes (which ones)
    • [x] no

    Level of RxSwift knowledge: (this is so we can understand your level of knowledge and formulate the response in an appropriate manner)

    • [x] just starting
    • [ ] I have a small code base
    • [ ] I have a significant code base
    opened by yudonlee 3
  • Remove print(

    Remove print("Subscription") not supposed to exist in Getting Started document

    in Getting Started document's creating-an-observable-that-performs-work

    448 line and 455 line is calling print("Subscribed") so print log should print "Subscribed" 4 times (2 times for calling MyInterval, 2 time for 448 line and 455 line)

    I think you forgot to remove 448, 455 line when wrote this document

    It might be confusing for beginners like me, so can you remove 448, 455 line or fix print log?

    in conclusion

    let counter = myInterval(.milliseconds(100))
    
    print("Started ----")
    
    let subscription1 = counter
        .subscribe(onNext: { n in
            print("First \(n)")
        })
        
    print("Subscribed")
    
    let subscription2 = counter
        .subscribe(onNext: { n in
            print("Second \(n)")
        })
        
    print("Subscribed")
    
    Thread.sleep(forTimeInterval: 0.5)
    
    subscription1.dispose()
    
    print("Disposed")
    
    Thread.sleep(forTimeInterval: 0.5)
    
    subscription2.dispose()
    
    print("Disposed")
    
    print("Ended ----")
    

    output of this code should be

    Started ----
    Subscribed
    Subscribed
    Subscribed
    Subscribed
    First 0
    Second 0
    First 1
    Second 1
    First 2
    Second 2
    First 3
    Second 3
    First 4
    Second 4
    Disposed
    Second 5
    Second 6
    Second 7
    Second 8
    Second 9
    Disposed
    Ended ----
    

    so I recommend to change code like this

    let counter = myInterval(.milliseconds(100))
    
    print("Started ----")
    
    let subscription1 = counter
        .subscribe(onNext: { n in
            print("First \(n)")
        })
        
    // remove this line
    
    let subscription2 = counter
        .subscribe(onNext: { n in
            print("Second \(n)")
        })
        
    // remove this line
    
    Thread.sleep(forTimeInterval: 0.5)
    
    subscription1.dispose()
    
    print("Disposed")
    
    Thread.sleep(forTimeInterval: 0.5)
    
    subscription2.dispose()
    
    print("Disposed")
    
    print("Ended ----")
    
    opened by Neph3779 0
  • Where are 6.5.0 -> RXCocoa.Frameworks and RxRelay.Frameworks ?

    Where are 6.5.0 -> RXCocoa.Frameworks and RxRelay.Frameworks ?

    Short description of the issue:

    Sorry for the dummy question, but I can't find link to download version 6.5.0 of : RxCocoa.xcFramework RxRelay.xcFramework

    Expected outcome:

    A link 😅

    What actually happens:

    No Link 😅

    Self contained code example that reproduces the issue: for 6.5.0 version : https://github.com/ReactiveX/RxSwift/releases/download/6.5.0/RxSwift.xcframework.zip. <- 🎉 https://github.com/ReactiveX/RxSwift/releases/download/6.5.0/RxCocoa.xcframework.zip. <- 😢 https://github.com/ReactiveX/RxSwift/releases/download/6.5.0/RxRelay.xcframework.zip. <- 😢

    on 6.2.0 versino : https://github.com/ReactiveX/RxSwift/releases/download/6.2.0/RxSwift.xcframework.zip. <- 🎉 https://github.com/ReactiveX/RxSwift/releases/download/6.2.0/RxCocoa.xcframework.zip. <- 🎉 https://github.com/ReactiveX/RxSwift/releases/download/6.2.0/RxRelay.xcframework.zip. <- 🎉

    RxSwift/RxCocoa/RxBlocking/RxTest version/commit

    6.5.0

    Platform/Environment

    • [ x] iOS
    • [ x] macOS
    • [ x] tvOS
    • [ x] watchOS
    • [ x] playgrounds
    opened by vassily-fr 0
  • Rxcocoa ABI not supported

    Rxcocoa ABI not supported

    :warning: If you don't have something to report in the following format, it will probably be easier and faster to ask in the slack channel first. :warning:

    :warning: Please take you time to fill in the fields below. If we aren't provided with this basic information about your issue we probably won't be able to help you and there won't be much we can do except to close the issue :( :warning:

    If you still want to report issue, please delete above statements before submitting an issue.

    Short description of the issue: RXCocoa is not supporting ABI

    We are using Rxcoco 6.2.0 version and Xcode 13.0, now we are updating our project to Xcode 14.1 , all other Rx frameworks (6.2.0) are working as expected but Rxcocoa is giving compilation error

    "Failed to build Module 'RxCocoa', this SDK is not supported by the compiler (the SDK is built with Apple Swift version 5.4) while this compiler is 'Apple Swift version 5.7.1'

    Expected outcome:

    what you expect to happen goes here

    What actually happens:

    what actually happens goes here

    Self contained code example that reproduces the issue:

      code goes here
      
    // If we can't get a self contained code example that reproduces the issue, there is a big chance we won't be able
    // to help you because there is not much we can do.
    //
    // `Self contained code example` means:
    //
    // * that we should be able to just run the provided code without changing it.
    // * that it will reproduce the issue upon running
    

    RxSwift/RxCocoa/RxBlocking/RxTest version/commit

    version or commit here

    Platform/Environment

    • [x] iOS
    • [ ] macOS
    • [ ] tvOS
    • [ ] watchOS
    • [ ] playgrounds

    How easy is to reproduce? (chances of successful reproduce after running the self contained code)

    • [x] easy, 100% repro
    • [ ] sometimes, 10%-100%
    • [ ] hard, 2% - 10%
    • [ ] extremely hard, %0 - 2%

    Xcode version:

      Xcode version goes here
    

    :warning: Fields below are optional for general issues or in case those questions aren't related to your issue, but filling them out will increase the chances of getting your issue resolved. :warning:

    Installation method:

    • [ ] CocoaPods
    • [x] Carthage
    • [ ] Git submodules

    I have multiple versions of Xcode installed: (so we can know if this is a potential cause of your issue)

    • [ ] yes (which ones)
    • [ ] no

    Level of RxSwift knowledge: (this is so we can understand your level of knowledge and formulate the response in an appropriate manner)

    • [ ] just starting
    • [ ] I have a small code base
    • [ ] I have a significant code base
    opened by sreekanthps 0
  • Crash. Debug.swift line 46 logEvent(_:dateFormat:content:)

    Crash. Debug.swift line 46 logEvent(_:dateFormat:content:)

    Crashed: rxswift.queue.DispatchQoS(qosClass: Dispatch.DispatchQoS.QoSClass.background, relativePriority: 0) 0 libicucore.A.dylib 0xddff4 icu::Calendar::getTimeZone() const + 506 1 libicucore.A.dylib 0x1f05a4 ucal_setTimeZone + 160 2 CoreFoundation 0x8c968 __cficu_ucal_setTimeZone + 64 3 CoreFoundation 0x817a4 __ResetUDateFormat + 1784 4 CoreFoundation 0xae1d0 __CreateCFDateFormatter + 320 5 Foundation 0x64d90 -[NSDateFormatter regenerateFormatter] + 272 6 Foundation 0x26288 -[NSDateFormatter stringForObjectValue:] + 140 7 XXXXXX_Binary 0x41badf0 logEvent(:dateFormat:content:) + 32 (Debug.swift:32) 8 XXXXXX_Binary 0x41bb930 specialized DebugSink.init(parent:observer:cancel:) + 46 (Debug.swift:46) 9 XXXXXX_Binary 0x41bb530 Debug.run(:cancel:) + 99 (Debug.swift:99) 10 XXXXXX_Binary 0x41e1080 closure #1 in Producer.subscribe(:) + 2684512 11 XXXXXX_Binary 0x41b7994 specialized CurrentThreadScheduler.schedule(:action:) + 25 (CurrentThreadScheduler.swift:25) 12 XXXXXX_Binary 0x41e0cec Producer.subscribe(:) + 2683596 (:2683596) 13 XXXXXX_Binary 0x41d9254 ObservableType.subscribe(onNext:onError:onCompleted:onDisposed:) + 80 (ObservableType+Extensions.swift:80) image

    opened by pandaleecn 2
Releases(6.5.0)
  • 5.1.3(Aug 11, 2021)

    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.

    Source code(tar.gz)
    Source code(zip)
  • 6.1.0(Feb 11, 2021)

    RxSwift 6.1

    Thanks to @iDevid, @marcelofabri, @faimin and @danielt1263 for their contributions to this release 🤘 💯

    Breaking Changes 🔥

    • Deprecate withUnretained for 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.

    Other changes 🆕

    • Add new subscribe(with:onNext:onError:onCompleted:onDisposed:) alternatives to withUnretained. This exists for all traits and types: Observable, Driver, Signal, Infallible, Completable, Single, Maybe #2290
    • Reactive now supports structs and value-types again, with the dynamic look-up specifically dealing with AnyObjects #2285
    • Fix xcframework support for RxCocoa (Drag in new RxCocoaRuntime.xcframework alongside RxCocoa)
    • Freeze MaybeEvent and CompletableEvent #2271 #2272
    • Fix missing RxCocoaRuntime.h header in RxCocoa podspec #2281
    • Remove invalid libswiftXCTest.dylib linking to support Xcode 12.5
    • Print URLRequest body httpBody, regardless of HTTP Method #2288
    Source code(tar.gz)
    Source code(zip)
    RxBlocking.xcframework.zip(5.36 MB)
    RxCocoa.xcframework.zip(21.62 MB)
    RxCocoaRuntime.xcframework.zip(6.36 MB)
    RxRelay.xcframework.zip(1.07 MB)
    RxSwift.xcframework.zip(44.74 MB)
    RxTest.xcframework.zip(7.41 MB)
  • 6.0.0(Jan 1, 2021)

    RxSwift 6 is here!

    New year, new version, new logo - such an exciting day! 🥳

    RxSwift Logo

    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.

    • All ReactiveCompatible objects (.rx namespace) get Binders for all properties for free using @dynamicMemberLookup.
    • New Infallible object which is identical to Observable with the guarantee of never failing.
    • Add variadic drive() and emit() to multiple observers and relays.
    • New decode(type:decoder:) operator for ObsrvableTypes of Data.
    • SingleEvent is now simply Result<Element, Swift.Error> and methods changed accordingly (e.g. subscribe(onSuccess:onFailure:)).
    • Add ReplayRelay.
    • Add new withUnretained(_:) operator.
    • Add distinctUntilChanged(at keyPath:).
    • Add UIApplication Reactive extensions .
    • Rename catchError(_:) to catch(_:).
    • Rename catchErrorJustReturn(_:) to catchAndReturn(_:).
    • Rename elementAt(_:) to element(at:).
    • Rename retryWhen(_:) to retry(when:).
    • Rename takeUntil(_:) to take(until:) and takeUntil(behavior:_:) to take(until:behavior:).
    • Rename takeWhile(_:) to take(while:) and takeWhile(behavior:_:) to take(while:behavior:).
    • Rename take(_:) duration overload to take(for:) (e.g. take(for: .seconds(3))).
    • Rename skipWhile(_:) to skip(while:).
    • Rename takeUntil(_:) to take(until:).
    • Rename observeOn and subscribeOn to observe(on:) and subscribe(on:).
    • ignoreElements() now returns Observable<Never>.
    • Make SharedSequence conform to ObservableConvertibleType.
    • Add onDisposed to Maybe, Completable and Single.
    • Unify and optimize swizzling extensions into a single one.
    • Add DisposeBag function builder to allow easy comma-less initialization of a DisposeBag.
    • Advance support of XCFrameworks by enabling BUILD_LIBRARY_FOR_DISTRIBUTION and cleaning up.
    • Move URLSession logging settings to a more appropriate URLSession.rx.shouldLogRequest configurable closure.
    • Many, many, many quality of life bugs and fixes.
    Source code(tar.gz)
    Source code(zip)
    RxSwift.xcframework.zip(44.44 MB)
    RxTest.xcframework.zip(7.49 MB)
    RxCocoa.xcframework.zip(21.47 MB)
    RxRelay.xcframework.zip(1.07 MB)
    RxBlocking.xcframework.zip(5.36 MB)
    RxCocoaRuntime.xcframework.zip(6.36 MB)
  • 6.0.0-rc.2(Nov 21, 2020)

    RxSwift 6.0.0 RC2

    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:

    • Support for XCFrameworks, with binaries now bundled with each release.
    • Updated tests for new Infallible trait.
    • Fix an issue building for watchOS.
    • Move URLSession logging settings to a more appropriate URLSession.rx.shouldLogRequest configurable closure.
    • README, CI, and additional house cleaning.
    Source code(tar.gz)
    Source code(zip)
    RxTest.xcframework.zip(6.67 MB)
    RxSwift.xcframework.zip(41.88 MB)
    RxRelay.xcframework.zip(1.04 MB)
    RxCocoa.xcframework.zip(20.03 MB)
    RxBlocking.xcframework.zip(4.64 MB)
  • 6.0.0-rc.1(Oct 6, 2020)

    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) get Binders for all properties for free using @dynamicMemberLookup.
    • New Infallible object which is identical to Observable with the guarantee of never failing.
    • Add variadic drive() and emit() to multiple observers and relays.
    • New decode(type:decoder:) operator for ObsrvableTypes of Data.
    • SingleEvent is now simply Result<Element, Swift.Error> and methods changed accordingly (e.g. subscribe(onSuccess:onFailure:)).
    • Add ReplayRelay.
    • Add distinctUntilChanged(at keyPath:).
    • Add UIApplication Reactive extensions .
    • Rename catchError(_:) to catch(_:).
    • Rename catchErrorJustReturn(_:) to catchAndReturn(_:).
    • Rename elementAt(_:) to element(at:).
    • Rename retryWhen(_:) to retry(when:).
    • Rename takeUntil(_:) to take(until:) and takeUntil(behavior:_:) to take(until:behavior:).
    • Rename takeWhile(_:) to take(while:) and takeWhile(behavior:_:) to take(while:behavior:).
    • Rename take(_:) duration overload to take(for:) (e.g. take(for: .seconds(3))).
    • Rename skipWhile(_:) to skip(while:).
    • Rename takeUntil(_:) to take(until:).
    • Rename observeOn and subscribeOn to observe(on:) and subscribe(on:).
    • ignoreElements() now returns Observable<Never>.
    • Make SharedSequence conform to ObservableConvertibleType.
    • Add onDisposed to Maybe, Completable and Single.
    • Unify and optimize swizzling extensions into a single one.
    • Add DisposeBag function builder to allow easy comma-less initialization of a DisposeBag.
    • Advance support of xcframeworks by enabling BUILD_LIBRARY_FOR_DISTRIBUTION and cleaning up.
    • Many, many, many quality of life bugs and fixes.
    Source code(tar.gz)
    Source code(zip)
  • 5.1.1(Mar 26, 2020)

    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

    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(76.50 MB)
  • 5.1.0(Mar 3, 2020)

  • 5.0.1(Apr 30, 2019)

  • 5.0.0(Apr 29, 2019)

    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 of DispatchTimeInterval. For example - throttle(1.2) would change to throttle(.milliseconds(1200)), while throttle(3) would change to throttle(.seconds(3)). #1472
    • Variable is now entirely deprecated. #1922
    • do now provides additional "after" closures. For example, do(onNext:) and do(afterNext:). #1898
    • bind(to:) now supports multiple observers (e.g. bind(to: observer1, observer2)). #1702
    • Changes the return type of ObservableType.toArray to Single. #1923
    • Adds compactMap. #1925
    • Deprecate Completable.merge in favor of Completable.zip. #1929 #1931
    • RxSwift can be built as a Static Library using Carthage 0.33 and up. #1940

    Anomalies

    • SubjectType.SubjectObserverType has been renamed to SubjectType.Observer. #1950
    • The S associated type has been renamed to Subject where applicable. #1950
    • The S generic constraint on SharedSequence has been renamed to SharingStrategy. #1951
    • The E associated type on ObservableConvertibleType and ObserverType have been renamed to Element. #1945
    • The C and S associated types have been renamed to Collection and Sequence accordingly. #1949
    • Renamed ElementType associatedtype to Element. #1945
    • Renamed TraitType associatedtype to Trait. #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 of combineLatest & zip.
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(67.01 MB)
  • 4.5.0(Apr 1, 2019)

  • 4.4.2(Mar 10, 2019)

  • 4.4.1(Feb 9, 2019)

    • 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.
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(64.63 MB)
  • 4.4.0(Nov 2, 2018)

    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 and Recorded conditional conformance to Equatable where their Element is equatable on RXTest for clients that are using Swift >= 4.1.
    • Adds string to NSTextView.
    • Consolidates per platform frameworks to multi-platform frameworks.
    • Xcode 10.1 compatible.

    Anomalies

    • Fixes problem with canceling events scheduled on serial scheduler through observeOn operator. #1778
    • Fixes problem with UISearchBar.text property not triggering update when cancel button is tapped. #1714
    • Updates watchos minimum target to 3.0. #1752
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(64.37 MB)
  • 4.3.1(Sep 21, 2018)

  • 4.3.0(Sep 16, 2018)

    • Compatibility with Xcode 10.0
    • Adds new insert extension to collect and add multiple disposables to DisposeBag.
    • Adds scan(into:accumulator:).
    • Adds queuePriority parameter (defaults to .normal) to OperationQueueScheduler.
    • Performance enhancement reduces Bag dispatch inline code size by 12%.
    • Adds customCaptureSubscriptionCallstack hook to allow custom subscription callstacks to be generated.
    • Remove usage of Variable from Playground, Example projects and Tests.
    • Add XCTAssertRecordedElements to XCTest+Rx.

    Anomalies

    • Fix build issues on new arm64_32 architecture (watchOS 5).
    • Removes string interpolation warning.
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(62.10 MB)
  • 4.2.0(Jun 8, 2018)

    • Adds Smart Key Path subscripting to create a binder for property of object.
    • Adds UICollectionView extensions:
      • prefetchItems
      • cancelPrefetchingForItems
    • Adds UITableView extensions:
      • prefetchRows
      • cancelPrefetchingForRows
    • Fixes various spelling mistakes and missing parameters.
    • Adds UISegmentedControlExtensions:
      • titleForSegment(at:)
      • imageForSegment(at:)
    • Adds Maybe.ifEmpty(default:) operator.
    • Adds Maybe.ifEmpty(switchTo:) operator.
    • Adds Maybe.catchErrorJustReturn(_:) operator.
    • Add Single.flatMapMaybe(_:) operator.
    • Add Single.flatMapCompletable(_:) operator.
    • Add Single.zip(_:) operator.
    • Add Single.catchErrorJustReturn(_:) operator.
    • Add Single.asMaybe(_:) operator.
    • Add Single.asCompletable(_:) operator.

    Anomalies

    • Lower macOS Deployment Target to 10.9
    • Deprecates UISegmentedControl.enabled(forSegmentAt:) in favor of UISegmentedControl.enabledForSegment(at:).
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(53.06 MB)
  • 4.1.2(Feb 4, 2018)

  • 4.1.1(Jan 9, 2018)

  • 4.1.0(Dec 27, 2017)

    • Adds Recorded<Event<T>> array factory method in RxTest. #1531
    • Replaces global functions next, error, completed with Recorded.next, Recorded.error, Recorded.completed in RxTest. #1510
    • Removes AnyObject constraint from Delegate parameter on DelegateProxy. #1442
    • Adds ObservableType.bind(to:) overloads for PublishRelay and BehaviorRelay.
    • Adds ControlEvent.asSignal().
    • Adds UISegmentedControl.rx.enabled(forSegmentAt:) extension.
    • Adds UIStepper.rx.stepValue extension.
    • Adds error handling Hook to Single, Maybe and Completable. #1532
    • Adds recordCallStackOnError to improve performance of DEBUG configuration.

    Anomalies

    • Changes return value of blocking version of single operator from E? to E. #1525
    • Removes deprecation attribute from asSharedSequence.
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(39.26 MB)
  • 4.0.0(Oct 17, 2017)

    • Adds global Hooks and implements error handling hook.
    • Deprecates asSharedSequence extensions on ObservableType.
    • Publicly exposes controlProperty.

    Anomalies

    • Changes Observable extensions to ObservableType extensions.
    • Changes UITableView.didUpdateFocusInContextWithAnimationCoordinator extension argument to UITableViewFocusUpdateContext.
    • Changes access modifier of DelegateProxy.setForwardToDelegate to open.
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(39.15 MB)
  • 4.0.0-rc.0(Oct 8, 2017)

  • 4.0.0-beta.1(Oct 1, 2017)

    • Adds attributedText to UITextField. #1249
    • Adds attributedText to UITextView. #1249
    • Deprecates shareReplayLatestWhileConnected and shareReplay in favor of share(replay:scope:). #1430
    • Changes publish, replay, replayAll to clear state in case of sequence termination to be more consistent with other Rx implementations and enable retries. #1430
    • Replaces share with default implementation of share(replay:scope:). #1430
    • Adds HasDelegate and HasDataSource protocols.
    • Updates package version to v4 format. #1418

    Anomalies

    • Adds deprecated warnings to API parts that were missing it. #1427
    • Improves memory handling in isScheduleRequiredKey. #1428
    • Removes pre-release identifier from bundle version to enable TestFlight submissions. #1424
    • Removes code coverage to enable TestFlight submissions. #1423
    • Fixes Xcode warnings. #1421
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(50.86 MB)
  • 4.0.0-beta.0(Sep 18, 2017)

    • Adds materialize() operator for RxBlocking's BlockingObservable. #1383
    • Adds first operator to ObservableType.
    • Deprecates UIBindingObserver in favor of Binder. #1411
    • Adds another specialization of SharedSequence called Signal.
    • Refactors DelegateProxy to be type safe.
    • Changes nested SharedSequence strategy to use inner sharing strategy for result.

    Anomalies

    • Call controlTextDidChange(…) as an optional method. #1406
    • Fixed issue with NSControl.rx.value regarding multiple observers. #1399
    • Removes useless extensions from PrimitiveSequence. #1248
    Source code(tar.gz)
    Source code(zip)
  • 4.0.0-alpha.1(Aug 20, 2017)

    • Merges 3.6.1 changes.
    • Adds UIScrollView.willEndDragging extension. #1365
    • Adds enumerated operator (deprecates skipWhileWithIndex, takeWhileWithIndex, flatMapWithIndex, mapWithIndex).

    Anomalies

    • Fixes gesture recognizer extensions crash. #1382
    • Adds onSubscribed parameter to SharedSequence extensions.
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(52.17 MB)
  • 4.0.0-alpha.0(Jul 31, 2017)

  • 3.6.1(Jul 21, 2017)

  • 3.6.0(Jul 17, 2017)

    • Adds timeout operator to PrimitiveSequence (Single, Maybe, Observable)
    • Adds delay operator to SharedSequence.
    • Adds andThen operator to Completeable.
    • Adds concat operator to Completeable.
    • Adds RxPickerViewDataSourceType
    • Adds UIPickerView extensions:
      • modelSelected
      • itemTitles
      • itemAttributedTitles
      • items
    • Adds UITableView extensions:
      • modelDeleted
    • Adds UICollectionView extensions:
      • itemHighlighted
      • itemUnhighlighted
      • willDisplayCell
      • didEndDisplayingCell
      • willDisplaySupplementaryView
      • didEndDisplayingSupplementaryView
    • Adds UIScrollView extensions:
      • willBeginDecelerating
      • willBeginDragging
      • willBeginZooming
      • didEndZooming

    Anomalies

    • Fixes deadlock anomaly in shareReplayWhileLatest. #1323
    • Removes duplicated events swallowing in NSControl on macOS.
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(52.97 MB)
  • 3.5.0(May 30, 2017)

    • Adds from operator on "SharedSequence"
    • Adds merge operator on "Completable"
    • Adds using operator on "PrimitiveSequence"
    • Adds concatMap operator.
    • Adds share(replay:scope:) operator.
    • Adds multicast(makeSubject:) operator.
    • Adds UIButton.image(for:) extension.
    • Adds UIButton.backgroundImage(for:) extension.
    • fixes typos

    Anomalies

    • Improves reentrancy and synchronization checks.
    • Issues with share() and shareReplay(_:). #1111
    • .share() inconsistent in behavior. #1242
    • Fixes issues with Driver sometimes sending initial element async. #1253
    Source code(tar.gz)
    Source code(zip)
    RxSwift.framework.zip(52.24 MB)
Owner
ReactiveX
Reactive Extensions for Async Programming
ReactiveX
Observable is the easiest way to observe values in Swift.

Observable is the easiest way to observe values in Swift. How to Create an Observable and MutableObservable Using MutableObservable you can create and

Robert-Hein Hooijmans 368 Nov 9, 2022
Very simple Observable and Publisher implementation for iOS apps.

Very simple Observable and Publisher implementation for iOS apps.

Igor Kulman 7 Jun 11, 2022
🛶Shallows is a generic abstraction layer over lightweight data storage and persistence.

Shallows Shallows is a generic abstraction layer over lightweight data storage and persistence. It provides a Storage<Key, Value> type, instances of w

Oleg Dreyman 620 Dec 3, 2022
MarkdownView is a WKWebView based UI element, and internally use bootstrap, highlight.js, markdown-it.

MarkdownView is a WKWebView based UI element, and internally use bootstrap, highlight.js, markdown-it.

Keita Oouchi 1.8k Dec 21, 2022
TabDrawer is a customizable TabBar UI element that allows you to run a block of code upon TabBarItem selection

TabDrawer TabDrawer is a customizable TabBar UI element that allows you to run a block of code upon TabBarItem selection, or display a customizable dr

Winslow DiBona 503 Oct 5, 2022
CodableCSV - Read and write CSV files row-by-row or through Swift's Codable interface.

CodableCSV provides: Imperative CSV reader/writer. Declarative CSV encoder/decoder. Support multiple inputs/outputs: Strings, Data blobs, URLs, and St

Marcos Sánchez-Dehesa 369 Jan 8, 2023
📬 A lightweight implementation of an observable sequence that you can subscribe to.

Features Lightweight Observable is a simple implementation of an observable sequence that you can subscribe to. The framework is designed to be minima

Felix M. 133 Aug 17, 2022
Observable is the easiest way to observe values in Swift.

Observable is the easiest way to observe values in Swift. How to Create an Observable and MutableObservable Using MutableObservable you can create and

Robert-Hein Hooijmans 368 Nov 9, 2022
Very simple Observable and Publisher implementation for iOS apps.

Very simple Observable and Publisher implementation for iOS apps.

Igor Kulman 7 Jun 11, 2022
Type-safe observable values and collections in Swift

GlueKit ⚠️ WARNING ⚠️ This project is in a prerelease state. There is active work going on that will result in API changes that can/will break code wh

null 361 Oct 12, 2022
📬 A lightweight implementation of an observable sequence that you can subscribe to.

Features Lightweight Observable is a simple implementation of an observable sequence that you can subscribe to. The framework is designed to be minima

Felix M. 133 Aug 17, 2022
Observable Object Debugger - Watch for ObservableObject in real time

Observable Object Debugger Watch for ObservableObject in real time. (This is the Alpha version) Quick Start Add package to you project.

Yusuke Hosonuma 3 Jun 19, 2022
MacOS Serial solution (Observable & Event-Driven) to make integration of Serial peripherals trivial

SerialSwift SerialSwift makes communicating with your Serial Peripherals on MacOS trivial. Better still, SerialSwift is designed to be fundamnetally O

Flowduino 2 Sep 9, 2022
Type-safe networking abstraction layer that associates request type with response type.

APIKit APIKit is a type-safe networking abstraction layer that associates request type with response type. // SearchRepositoriesRequest conforms to Re

Yosuke Ishikawa 1.9k Dec 30, 2022
Dratini is a neat network abstraction layer.

Dratini Dratini is a neat network abstraction layer. If you are looking for a solution to make your network layer neat, Dratini is your choice. Dratin

Kevin Lin 37 Jan 29, 2022
Network abstraction layer written in Swift.

Moya 14.0.0 A Chinese version of this document can be found here. You're a smart developer. You probably use Alamofire to abstract away access to URLS

Moya 14.4k Jan 1, 2023
Elegant network abstraction layer in Swift.

Elegant network abstraction layer in Swift. 中文 Design Features Requirements Communication Installation Usage Base Usage - Target - Request - Download

null 100 Dec 9, 2022
Lightweight network abstraction layer, written on top of Alamofire

TRON is a lightweight network abstraction layer, built on top of Alamofire. It can be used to dramatically simplify interacting with RESTful JSON web-

MLSDev 528 Dec 26, 2022
Reactive WebSockets - A lightweight abstraction layer over Starscream to make it reactive.

RxWebSocket Reactive extensions for websockets. A lightweight abstraction layer over Starscream to make it reactive. Installation RxWebSocket is avail

Flávio Caetano 57 Jul 22, 2022
Nora is a Firebase abstraction layer for FirebaseDatabase and FirebaseStorage

Nora is a Firebase abstraction layer for working with FirebaseDatabase and FirebaseStorage. Stop spending all that time cleaning up your view controll

Steven Deutsch 273 Oct 15, 2022