A simple Weather app that retrieves information of real-time weather forecast.
My name is Gia Nguyen. If you have any question or further information, feel free to contact me by nhgia.apcs(at)gmail.com and/or LinkedIn.
- XCode 13.1+
- Simulator with iOS 14+
- This application using the MVVM with a little bit of Clean Architecture.
- Other design patterns: Singleton, Dependency Injection.
- The structure of the project can be listed as below:
.
├── MyWeather
│ ├── Application // Anything related to the core of the App
│ │ ├── Base // Contains AppDelegate (or @main App in SwiftUI)
│ │ └── Config // Any client configuration
│ │ ├── Info.plist
│ │ ├── Production.xcconfig // Server url, bundleID, app name, app version
│ │ ├── Sandbox.xcconfig // Same, to seperate different app's variants
│ │ └── Config.swift // API Key(s), default values
│ ├── Infrastructure // Handle network tasks, enums, high severity methods
│ ├── Modules // Any feature will be implemented here
│ │ └── <Any module name>
│ │ ├── Model
│ │ ├── View
│ │ └── ViewModel
│ ├── Resources
│ │ ├── Assets.xcassets // Local images/assets
│ │ └── Localizable // String files for multi-language
│ └── Utilities
│ └── Extensions // Extend types
├── MyWeather.xcodeproj
├── MyWeatherTests // Contains unit tests for any modules
└── README.md // This file
- External libraries: Alamofire (for network tasks) and Kingfisher (for image loading & caching). Install via Swift Package Manager (SPM).
- UI framework is SwiftUI. It is fast, modern, and easy to implement. Dark mode supported.
- Please kindly download/clone the repo.
- Open the file
MyWeather.xcodeproj
with Xcode 13.1+. - After launching the project, please wait SPM fetching all the libraries. You can find the progess at the bottom left of Xcode's project navigator. After fetching successfully, the "Package Dependencies" section should look like this figure below.
- Programming language: Swift.
- Design app's architecture: MVVM
- Application UI looks like prototype.
- Unit tests
- Exception handling
- Readme file