Skip to content

nhgia/MyWeather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyWeather

A simple Weather app that retrieves information of real-time weather forecast.

About the author:

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.

Prerequisite

  • XCode 13.1+
  • Simulator with iOS 14+

Practices applied into the Application

  • This application using the MVVM with a little bit of Clean Architecture.
  • Other design patterns: Singleton, Dependency Injection.

Source code structure, libraries, and frameworks

  • 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.

How to run the Application

  1. Please kindly download/clone the repo.
  2. Open the file MyWeather.xcodeproj with Xcode 13.1+.
  3. 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.

4. Press Command + R or click the Play button to run the application. Please choose a simulator with iOS 14 or higher. The default build configuration is "Sandbox", simulates the environment for developing. You can change it in the "Edit scheme" to either "Sandbox" or "Production".

Checklist

  • Programming language: Swift.
  • Design app's architecture: MVVM
  • Application UI looks like prototype.
  • Unit tests
  • Exception handling
  • Readme file

Screenshots

About

Simple Weather App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages