Drop-in Xcode File Templates The Composable Architecture (TCA).
- Reducer – scaffold with State, Action, body
- Dependency Client – @DependencyClient + DependencyKey
Prerequisites
- Xcode 15.0+ (Swift 5.9+) — needed for @Reducer and @DependencyClient.
- TCA installed in your project via Swift Package Manager.
Install TCA (Swift Package Manager)
1. Xcode
2. File → Add Packages…
3. Enter: https://github.com/pointfreeco/swift-composable-architecture
4. Add ComposableArchitecture to your app target
1. Clone this repository.
2. Navigate to ~/Library/Developer
3. Drop the Xcode folder from the repo into the Developer folder.
4. Restart Xcode.
1. File → New → File…
2. Sidebar → Custom Templates
3. Pick TCA Reducer or TCA Dependency Client
4. Save As = the type name (e.g., ProfileReducer, UserClient)
5. For the Dependency Client, you’ll be prompted for Dependency Name (e.g., userClient) — this drives the property in DependencyValues.
Note
Xcode templates can’t auto-lowercase your filename for the dependency accessor, so we ask for Dependency Name explicitly.