Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RxSwiftCommunity/RxSwiftUtilities
Helpful classes and extensions for RxSwift
https://github.com/RxSwiftCommunity/RxSwiftUtilities
Last synced: about 2 months ago
JSON representation
Helpful classes and extensions for RxSwift
- Host: GitHub
- URL: https://github.com/RxSwiftCommunity/RxSwiftUtilities
- Owner: RxSwiftCommunity
- License: mit
- Created: 2016-11-22T16:58:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-12-05T18:45:57.000Z (about 3 years ago)
- Last Synced: 2024-11-11T01:36:27.404Z (2 months ago)
- Language: Swift
- Size: 89.8 KB
- Stars: 189
- Watchers: 12
- Forks: 40
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-rxswift - RxSwiftUtilities
README
RxSwiftUtilities
======================================
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/RxSwiftUtilities.svg)](https://cocoapods.org/pods/RxSwiftUtilities)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Platform](https://img.shields.io/cocoapods/p/RxSwiftUtilities.svg?style=flat)](http://cocoadocs.org/docsets/RxSwiftUtilities)
![CI](https://github.com/RxSwiftCommunity/RxSwiftUtilities/workflows/CI/badge.svg?branch=master)
[![codecov](https://codecov.io/gh/RxSwiftCommunity/RxSwiftUtilities/branch/master/graph/badge.svg)](https://codecov.io/gh/RxSwiftCommunity/RxSwiftUtilities)## About
Helpful classes and extensions for [RxSwift](https://github.com/ReactiveX/RxSwift) which don't belong in RxSwift core.
## Usage
Check out the [Documentation](http://cocoadocs.org/docsets/RxSwiftUtilities), the examples below, or the [Example App](#example-app).
#### ActivityIndicator
```swift
let signingIn = ActivityIndicator()let signedIn = loginButtonTap.withLatestFrom(usernameAndPassword)
.flatMapLatest { (username, password) in
return API.signup(username, password: password)
.trackActivity(signingIn)
}
}signingIn.asDriver()
.drive(UIApplication.shared.rx.isNetworkActivityIndicatorVisible)
.disposed(by: disposeBag)
```#### Two-way binding
```swift
(textField.rx.text <-> variable)
.disposed(by: disposeBag)
```## Example App
This repo contains an [Example App](ExampleApp/) with interactive examples.
To use the Example App:
```shell
cd ExampleApp
pod install
```Open the project located in [`ExampleApp/`](ExampleApp/) with Xcode and build/run it.
## Requirements
* Xcode 11
* Swift 5## Installation
### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html)
**Tested with `pod --version`: `1.1.1`**
In your `Podfile`:
```ruby
use_frameworks!target "YOUR_TARGET_NAME" do
pod "RxSwiftUtilities"
end
```Replace `YOUR_TARGET_NAME` and then, in the same directory, run:
```shell
pod install
```
### [Swift Package Manager](https://guides.cocoapods.org/using/using-cocoapods.html)**Tested with `xcode version`: `11.5`**
Add the dependency with xcode via `Files>Swift Packages>Add Package Dependency...`
Or
Create a `Package.swift` file.
```swift
// swift-tools-version:5.1import PackageDescription
let package = Package(
name: "RxSwiftUtiliesTestProject",
dependencies: [
.package(url: "https://github.com/RxSwiftCommunity/RxSwiftUtilities", from: "5.0.0")
],
targets: [
.target(name: "RxSwiftUtiliesTestProject", dependencies: ["RxSwiftUtilities"])
]
)
``````shell
$ swift build
```### [Carthage](https://github.com/Carthage/Carthage#installing-carthage)
**Tested with `carthage version`: `0.18`**
Add this to `Cartfile`
```
github "RxSwiftCommunity/RxSwiftUtilities"
```In the same directory, run:
```shell
carthage update
```Link/Embed frameworks as explained [here](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application). Besides linking `RxSwiftUtilities`, you will also need to link `RxSwift` and `RxCocoa`.
## Contributing
Help is always appreciated!
```shell
git clone [email protected]:RxSwiftCommunity/RxSwiftUtilities.git
cd RxSwiftUtilities
```
> Or use your own forked repo.```shell
carthage bootstrap
```
> This is necessary in order to be able to build the framework on its own and run tests.
However, if you prefer, you can instead develop it while it's within another project.Before submitting a PR, please make sure that the tests pass.