Latest 0.0.3
Homepage https://github.com/takuchantuyoshi/ReSwiftMonitor
License MIT
Platforms ios 9.0, requires ARC
Dependencies ReSwift, HandyJSON, Starscream
Authors

ReSwift middleware that can be used to communicate with redux-dev tools. It has been tested with http://remotedev.io/local/, but it should work with [other monitors]( https://github.com/zalmoxisus/remote-redux-devtools#monitoring) too.
This project is heavily inspired by the katanaMonitor-lib-swift.

Dependencies

Install the remotedev node server once:

npm install -g remotedev-server

Run the server (every time you want to use the monitor)

Project Integration

The monitor is shipped using Cocoapods.

Add the pod ReSwiftMonitor

pod 'ReSwiftMonitor', :configurations => ['Debug']

The middleware should be used in debug configurations only.

In your application, conditionally add the middleware. Here, for instance, we use the DEBUG macro to conditionally add the middleware in debug configurations only:

var middleware: [Middleware<AppState>] = {
    var _middleware: [Middleware<AppState>] = []
    #if DEBUG
    let monitorMiddleware = MonitorMiddleware.make(configuration: Configuration())
    _middleware.append(monitorMiddleware)
    #endif
    return _middleware
}()

let store = Store<AppState>(reducer: AppState.reducer(), state: AppState(), middleware: middleware)

Usage

  • Open http://remotedev.io/local/ in your browser. Click settings and make sure that Use custom local server is selected and the configuration is the proper ones (by default localhost and 8000). This is the UI where actions will appear
  • Launch remotedev in your terminal
  • Launch your Reswift application

Libraries Used

License

ReSwiftMonitor is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "ReSwiftMonitor",
    "version": "0.0.3",
    "summary": "ReSwift+redeux dev tools",
    "homepage": "https://github.com/takuchantuyoshi/ReSwiftMonitor",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "takuchantuyoshi": "[email protected]"
    },
    "source": {
        "git": "https://github.com/takuchantuyoshi/ReSwiftMonitor.git",
        "tag": "0.0.3"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source_files": [
        "Sources/**/*.{swift}",
        "Sources/*.{swift,h}"
    ],
    "dependencies": {
        "ReSwift": [
            "~> 4.0.0"
        ],
        "HandyJSON": [
            "~> 4.1.1"
        ],
        "Starscream": [
            "~> 3.0.2"
        ]
    }
}

Pin It on Pinterest

Share This