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

  1. Clone the repository:
git clone https://github.com/Zi0P4tch0/SwiftUICountries.git
  1. Open the SwiftUICountries.xcodeproj file in Xcode.

  2. Choose the desired target platform (iOS, macOS, or tvOS).

  3. 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 ?

? Useful Resources

Enhance your knowledge and skills in SwiftUI and Composable Architecture with these valuable resources:

  1. Swift Composable Architecture videos – A collection of informative videos about TCA from Point-Free.
  2. Krzysztof Zabłocki: TCA Best Practices – A blog post highlighting best practices for using TCA in your projects.
  3. 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! ?

GitHub

View Github