Skip to content

Commit

Permalink
Update metadata/some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
luizmb committed Jun 23, 2019
1 parent c181280 commit 62e9d75
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ let package = Package(
name: "SwiftRex",
products: [
.library(name: "SwiftRex", targets: ["SwiftRex"]),
.library(name: "SwiftRexForCombine", targets: ["SwiftRexForCombine"]),
.library(name: "SwiftRexForRac", targets: ["SwiftRexForRac"]),
.library(name: "SwiftRexForRx", targets: ["SwiftRexForRx"])
],
Expand All @@ -14,6 +15,7 @@ let package = Package(
],
targets: [
.target(name: "SwiftRex", dependencies: [], path: "Sources/Common"),
.target(name: "SwiftRexForCombine", dependencies: ["SwiftRex"], path: "Sources/Combine"),
.target(name: "SwiftRexForRac", dependencies: ["SwiftRex", "ReactiveSwift"], path: "Sources/ReactiveSwift"),
.target(name: "SwiftRexForRx", dependencies: ["SwiftRex", "RxSwift"], path: "Sources/RxSwift")
],
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# Introduction

SwiftRex is a framework that combines [event-sourcing pattern](https://docs.microsoft.com/en-us/azure/architecture/patterns/event-sourcing) and reactive programming ([RxSwift](https://github.com/ReactiveX/RxSwift) or [ReactiveSwift](https://github.com/ReactiveCocoa/ReactiveSwift)), providing a central state Store of which your ViewControllers can observe and react to, as well as dispatching events coming from the user interaction.
SwiftRex is a framework that combines [event-sourcing pattern](https://docs.microsoft.com/en-us/azure/architecture/patterns/event-sourcing) and reactive programming ([Combine](https://developer.apple.com/documentation/combine), [RxSwift](https://github.com/ReactiveX/RxSwift) or [ReactiveSwift](https://github.com/ReactiveCocoa/ReactiveSwift)), providing a central state Store of which your ViewControllers can observe and react to, as well as dispatching events coming from the user interaction.

This pattern is also known as "Unidirectional Dataflow" or ["Redux"](https://redux.js.org/basics/data-flow).

Expand Down Expand Up @@ -138,13 +138,13 @@ Because the `Middleware` accesses all events and the state of the app at any poi
- Reachability
- Navigation through the app (Redux Coordinator pattern)
- `NotificationCenter` and other delegates
- `RxSwift` observables / `ReactiveSwift` signal producers
- `Combine` publishers/subjects, `RxSwift` observables / `ReactiveSwift` signal producers

## 🌍 SideEffectProducer

`SideEffectProducer` defines a protocol for implementing a `RxSwift` or `ReactiveSwift` side-effect producer, that will warms up a cold observation once it's executed. If your producer needs the `EventProtocol` that started the side-effect, you can pass it in the `SideEffectProducer` initializer and save it in a property. Please keep in mind that for every event, a new instance of a `SideEffectProducer` will be created, which means that every execution is completely isolated from each other and if you need to access a shared resource or cancel previous operations you must be careful implementing such things.

Some Middlewares are shipped with SwiftRex. While you're still welcome to create your own Middlewares from the scratch, some of the stock ones can offer you a shortcut. For RxSwift or ReactiveSwift users we bring a `SideEffectMiddleware` that is a quick way to reuse your existing Observable/SignalProducer pipelines. The Middleware requires the implementation of only one method:
Some Middlewares are shipped with SwiftRex. While you're still welcome to create your own Middlewares from the scratch, some of the stock ones can offer you a shortcut. For Combine, RxSwift or ReactiveSwift users we bring a `SideEffectMiddleware` that is a quick way to reuse your existing Publisher/Observable/SignalProducer pipelines. The Middleware requires the implementation of only one method:

```swift
func sideEffect(for event: Event) -> AnySideEffectProducer<StateType>?
Expand Down
39 changes: 31 additions & 8 deletions SwiftRex.podspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Pod::Spec.new do |s|
s.name = 'SwiftRex'
s.version = '0.5.0'
s.summary = 'SwiftRex is a Redux implementation on top of RxSwift or ReactiveSwift'
s.summary = 'SwiftRex is a Redux implementation on top of Combine, RxSwift or ReactiveSwift'
s.description = <<-DESC
SwiftRex is a framework that combines event-sourcing pattern and reactive programming (RxSwift or ReactiveSwift), providing a central state Store of which your ViewControllers can observe and react to, as well as dispatching events coming from the user interaction.
SwiftRex is a framework that combines event-sourcing pattern and reactive programming (Combine, RxSwift or ReactiveSwift), providing a central state Store of which your ViewControllers or SwiftUI Views can observe and react to, as well as dispatching events coming from the user interaction.
This pattern is also known as 'Unidirectional Dataflow' or 'Redux'.
DESC
s.homepage = 'https://github.com/SwiftRex/SwiftRex'
Expand All @@ -14,27 +14,50 @@ Pod::Spec.new do |s|

s.requires_arc = true

s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.watchos.deployment_target = '3.0'
s.tvos.deployment_target = '9.0'
s.swift_version = '5.0'

s.frameworks = 'Foundation'
s.default_subspec = 'Core'

s.subspec "Core" do |ss|
ss.ios.deployment_target = '8.0'
ss.osx.deployment_target = '10.10'
ss.watchos.deployment_target = '3.0'
ss.tvos.deployment_target = '9.0'
ss.swift_version = '5.0'

ss.source_files = "Sources/Common/"
ss.framework = "Foundation"
end

s.subspec "UsingCombine" do |ss|
ss.ios.deployment_target = '13.0'
ss.osx.deployment_target = '10.15'
ss.watchos.deployment_target = '6.0'
ss.tvos.deployment_target = '13.0'
ss.swift_version = '5.1'

ss.source_files = "Sources/Combine/"
ss.dependency "SwiftRex/Core"
end

s.subspec "UsingRxSwift" do |ss|
ss.ios.deployment_target = '8.0'
ss.osx.deployment_target = '10.10'
ss.watchos.deployment_target = '3.0'
ss.tvos.deployment_target = '9.0'
ss.swift_version = '5.0'

ss.source_files = "Sources/RxSwift/"
ss.dependency "SwiftRex/Core"
ss.dependency 'RxSwift'
end

s.subspec "UsingReactiveSwift" do |ss|
ss.ios.deployment_target = '8.0'
ss.osx.deployment_target = '10.10'
ss.watchos.deployment_target = '3.0'
ss.tvos.deployment_target = '9.0'
ss.swift_version = '5.0'

ss.source_files = "Sources/ReactiveSwift/"
ss.dependency "SwiftRex/Core"
ss.dependency 'ReactiveSwift'
Expand Down

0 comments on commit 62e9d75

Please sign in to comment.