This example app demonstrates the usage of TCA (The Composable Architecture) to build a SwiftUI application.
- TCA: Utilizes The Composable Architecture for managing state and side effects.
- SwiftUI: Declarative UI framework for building modern iOS apps.
- Dependency Injection: Easy management of dependencies and testability.
- Unit Tests: Includes unit tests for business logic and use cases.
- Dark Mode: Supports Dark Mode seamlessly.
- Xcode 15.0+
- Swift 5.3+
- Homebrew installed
-
Install Homebrew Dependencies:
brew install xcodegen swiftlint swiftformat
-
Clone the Repository:
git clone git@github.com:ngocpd-1250/TCA-The-Composable-Architecture-example.git cd TCA_Example
-
Generate Xcode Project:
Use
xcodegen
to generate the Xcode project:xcodegen
-
Open Xcode:
Open the generated Xcode project:
open TCA_Example.xcodeproj
-
Build and Run:
Build and run the project in Xcode.
The project is structured into the following directories:
- Config: Contains configuration files and settings.
- DI: Manages Dependency Injection configurations.
- Data: Handles data sources, repositories, and networking.
- Presentation: Contains SwiftUI views, TCA features, and navigators.
- Resources: Includes assets, localization files, and other resources.
- Utils: Houses shared utilities, extensions, and helper functions.
- Linting: SwiftLint
- Formatting: SwiftFormat
- FlowStacks: for navigation management
- Factory: for dependency injection
- Rswift: for resource management
- Kingfisher: for loading and caching remote images
- Alamofire: for API requests