workflow
A unidirectional data flow library for Kotlin and Swift, emphasizing:
- Strong support for state-machine driven UI and navigation.
- Composition and scaling.
- Effortless separation of business and UI concerns.
This project is currently experimental and the API subject to breaking changes without notice.
Follow Square's engineering blog, The Corner, to see when
this project becomes stable.
While the API is not yet stable, this code is in heavy production use in Android and iOS
apps with millions of users.
Using Workflows in your project
Swift
Swift Package Manager
If you are developing your own package, be sure that Workflow is included in dependencies
in Package.swift
:
dependencies: [
.package(url: "git@github.com:square/workflow.git", from: "0.21.1")
]
In Xcode 11+, add Workflow directly as a dependency to your project with
File
> Swift Packages
> Add Package Dependency...
. Provide the git URL when prompted: git@github.com:square/workflow.git
.
Cocoapods
If you use CocoaPods to manage your dependencies, simply add Workflow and WorkflowUI to your
Podfile:
pod 'Workflow'
pod 'WorkflowUI'
Kotlin
Quick Start
To get started with a fresh, barebones, Workflow-based Android app, we've created a template
repository – just click "Use this template" to create a new repository with a simple but runnable
app: github.com/square/workflow-android-template
Maven Artifacts
Artifacts are hosted on Maven Central. If you're using Gradle, ensure mavenCentral()
appears in
your repositories
block, and then add dependencies on the following artifacts:
Lower-level Artifacts
Most code shouldn't need to depend on these directly. They should generally only be used to build
higher-level integrations with UI frameworks.
Resources
- Square Workflow – Droidcon NYC 2019 (slides)
- SF Android GDG @ Square 2019 - Hello Workflow
(live coding) - Android Dialogs 5-part Coding Series
- Reactive Workflows a Year Later – Droidcon NYC 2018
- The Reactive Workflow Pattern – Fragmented Podcast
- The Reactive Workflow Pattern Update – Droidcon SF 2017
- The Rx Workflow Pattern – Droidcon NYC 2017
(slides)
Support & Contact
Workflow maintainers hang out in the #squarelibraries
channel on the Kotlin Slack
and the #square-libraries-wtf channel on
the Android Study Group Slack.
Releasing and Deploying
See RELEASING.md.