FluxorExplorerInterceptor

一个 Interceptor(拦截器),用于在 Fluxor Store(存储) 上注册。 注册后,它会将 FluxorExplorerSnapshots(FluxorExplorer 快照) 发送到 FluxorExplorer

Swift version Platforms

Test Maintainability Test Coverage Twitter

⚙️ 使用方法

要让 FluxorExplorer 接收来自应用程序的所有操作和状态更改,只需在应用程序的 Fluxor Store 中注册 FluxorExplorerInterceptor。 当 FluxorExplorer 和应用程序在同一网络上运行时(例如,在 iOS 模拟器上运行应用程序),它们将自动连接并传输数据。

let store = Store(initialState: AppState())
#if DEBUG
store.register(interceptor: FluxorExplorerInterceptor(displayName: UIDevice.current.name))
#endif

注意: 建议仅在 DEBUG 构建中注册拦截器。

当使用 macOS App Sandbox 进行开发时

如果应用程序在 macOS 上运行并使用 App Sandbox,请记住启用“传入连接(服务器)”和“传出连接(客户端)”,以便能够与 FluxorExplorer 通信。