一个 Swift Composable Architeture 演示应用程序,内置于 SwiftUI 中

SwiftUICountry 🌍

SwiftUICountrys是一个使用SwiftUI和可组合架构(TCA)构建的跨平台演示应用程序。

它运行在iOS,macOS和tvOS上,展示了SwiftUI在多个Apple平台上创建无缝用户体验的强大功能。

该项目是使用 TCA 库进行干净和模块化应用程序开发的一个例子。

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 file in Xcode.SwiftUICountries.xcodeproj

  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

点击跳转