Shai Mishali

14pods

CombineExt

License: MIT

RxBlocking

Set of blocking operators for RxSwift. These operators are mostly intended for unit/integration tests with a couple of other special scenarios where they could be useful.

E.g.

Waiting for observable sequence to complete before exiting command line application.

License: NOASSERTION

  • Swift

RxCocoa

  • UI extensions
  • NSURL extensions
  • KVO extensions

License: NOASSERTION

  • Swift

RxCombine

License: MIT

RxFeedback

Simplest architecture for RxSwift. State + feedback loops.

  • Simple
    • If the system doesn't have state -> congrats, you have either a pure function or an observable sequence
    • It the system does have state, here we are :)
    • Interaction with that state is by definition a feedback loop.
    • => It's just state + CQRS
  • Straightforward
    • if it's state -> State
    • if it's a way to modify state -> Event/Command
    • it it's an effect -> encode it into part of state and then design a feedback loop
  • Declarative
    • System behavior is first declaratively specified and effects begin after subscribe is called => Compile time proof there are no "unhandled states"
  • Debugging is easier

    • A lot of logic is just normal pure function that can be debugged using Xcode debugger, or just printing the commands.
  • Can be applied on any level

    • Entire system
    • application (state is stored inside a database, CoreData, Firebase, Realm)
    • view controller (state is stored inside system operator)
    • inside feedback loop (another system operator inside feedback loop)
  • Works awesome with dependency injection

  • Testing

    • Reducer is a pure function, just call it and assert results
    • In case effects are being tested -> TestScheduler
  • Can model circular dependencies

  • Completely separates business logic from effects (Rx).

    • Business logic can be transpiled between platforms (ShiftJS, C++, J2ObjC)

License: MIT

  • Swift

RxMediaPicker

A reactive wrapper built around UIImagePickerController.

License: MIT

  • Swift

RxRelay

Because the Observer Design pattern is something every developer should know. It facilitates the communication between objects and simplify the logic of your app. Implementing it in a Reactive way will take it to a whole new level.

License: NOASSERTION

  • Swift

RxStarscream

A lightweight extension to subscribe Starscream websocket events with RxSwift.

License: Apache-2.0

  • Swift

RxSwift

This is a Swift port of ReactiveX.io

Like the original Rx, its intention is to enable easy composition of asynchronous operations and event streams.

It tries to port as many concepts from the original Rx as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS/Linux environment.

Probably the best analogy for those who have never heard of Rx would be:

git diff | grep bug | less # linux pipes - programs communicate by sending # sequences of bytes, words, lines, '

License: NOASSERTION

  • Swift

RxTest

Unit testing extensions for RxSwift. This library contains mock schedulers, observables, and observers that should make unit testing your operators easy as unit testing RxSwift built-in operators.

This library contains everything you needed to write unit tests in the following way: ```swift func testMap() { let scheduler = TestScheduler(initialClock: 0)

let xs = scheduler.createHotObservable([
    next(150, 1),
    next(210, 0),
    next(220, 1),
    next(230, 2),
    next(240, 4),
    completed(300)
    ])

let res = scheduler.start { xs.map { $0 * 2 } }

let correctEvents = [
    next(210, 0 * 2),
    next(220, 1 * 2),
    next(230, 2 * 2),
    next(240, 4 * 2),
    completed(300)
]

let correctSubscriptions = [
    Subscription(200, 300)
]

XCTAssertEqual(res.events, correctEvents)
XCTAssertEqual(xs.subscriptions, correctSubscriptions)

} ```

License: NOASSERTION

  • Swift

RxTests

Unit testing extensions for RxSwift. This library contains mock schedulers, observables, and observers that should make unit testing your operators easy as unit testing RxSwift built-in operators.

This library contains everything you needed to write unit tests in the following way: ```swift func testMap() { let scheduler = TestScheduler(initialClock: 0)

let xs = scheduler.createHotObservable([
    next(150, 1),
    next(210, 0),
    next(220, 1),
    next(230, 2),
    next(240, 4),
    completed(300)
    ])

let res = scheduler.start { xs.map { $0 * 2 } }

let correctEvents = [
    next(210, 0 * 2),
    next(220, 1 * 2),
    next(230, 2 * 2),
    next(240, 4 * 2),
    completed(300)
]

let correctSubscriptions = [
    Subscription(200, 300)
]

XCTAssertEqual(res.events, correctEvents)
XCTAssertEqual(xs.subscriptions, correctSubscriptions)

} ```

License:

  • Swift

RxViewModel

RxViewModel is the marriage between MVVM and Rx extensions

Since ReactiveViewModel project felt on stagnation and there's not Swift or Swift 2.0 implementation we found the need to implement something like this on Swift.

Given the fact that there's no Swift branch and the lack of interest in the project we felt it was better to give RxSwift/RxCocoa a chance and instead use it as the base for this reactive view model approach.

Long story short: a blatant Ā«imitationĀ» of ReactiveViewModelusing RxCocoa.

License: MIT

  • Swift

SMWebView

SMWebView is a delightful, lightweight Swift wrapper around UIWebView that lets you harness the power of Closures and Chaining. And of course - Get rid of those pesky, awful delegates ;-)

License: MIT

  • Swift

UIView+Positioning

UIView+Positioning provides shorthand methods and helpers to define the frame properties of any UIView based object in an easy fashion.

License: MIT

  • Swift