A Swift Composable Architeture demo app built int SwiftUI
SwiftUICountries ?
SwiftUICountries is a cross-platform demo app built using SwiftUI and Composable Architecture (TCA).
It runs on iOS, macOS, and tvOS, showcasing the power of SwiftUI to create a seamless user experience across multiple Apple platforms.
This project serves as an example of clean and modular app development using the TCA library.
Features ✨
- Browse a list of countries with basic information
- Add a country to favorites
- View detailed country profiles, including:
- Flag
- Capital (including map)
- Population
- Currencies
- Timezones
- Neighboring countries
- Search functionality to quickly find countries
- Dark mode support
- Realm used as a persistence layer
- Localized in both English and Italian
- Unit tests
Getting Started ?
Prerequisites
- Xcode 14.2 or later
- macOS 12.5 or later
- iOS 16, tvOS 16 or later (for running on devices)
Installation
- Clone the repository:
git clone https://github.com/Zi0P4tch0/SwiftUICountries.git
-
Open the
SwiftUICountries.xcodeproj
file in Xcode. -
Choose the desired target platform (iOS, macOS, or tvOS).
-
Run the app on the simulator or a connected device.
Built With ?
- SwiftUI – User interface toolkit
- Composable Architecture (TCA) – A library for building SwiftUI applications with a focus on modularity and testability
- Realm – A persistence layer used for data storage
Contributing ?
Contributions, issues, and feature requests are welcome! Feel free to fork the repository and submit a pull request with your changes.
License ?
This project is licensed under the MIT License – see the LICENSE file for details.
Acknowledgements ?
- RESTCountries API – API used for fetching country information
- Point-Free – For their great work on Composable Architecture
? Useful Resources
Enhance your knowledge and skills in SwiftUI and Composable Architecture with these valuable resources:
- Swift Composable Architecture videos – A collection of informative videos about TCA from Point-Free.
- Krzysztof Zabłocki: TCA Best Practices – A blog post highlighting best practices for using TCA in your projects.
- TCA: Working with SwiftUI bindings – A guide on how to effectively work with SwiftUI bindings in the context of TCA.
Happy coding, and don’t hesitate to reach out with any questions or suggestions! ?