Skip to content

markshiz/weather_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeatherApp

A simple app that checks the weather and current conditions using Swift Composable Architecture.

Light Mode Dark Mode

Why Swift Composable Architecture?

The library takes ideas from Facebook's Redux and Elm, using unidirectional flow --and particularly a reducer object-- to process all state changes. These state changes then get emitted/propogated back to the view via an observation regime. This library makes presentation layer state changes (which are all contained inside an Equatable struct) and associated side-effects very testable and declarative. SCA also works very well with SwiftUI and Combine, the foundations of new UI for iOS 13.

Tests

Unit Tests

  • Tests for its integration with the weather API, including test fixtures which test proper parsing
  • Tests for properly parsing the query the user types into the user interface
  • Tests for transforming querys into API queries and URLs
  • Tests for Kelvin to Farenheieght text conversions
  • Tests for app state equality
  • Tests for app reducer level state changes including errors

UI Tests

  • Several UI tests to integration test the application

Xcode Version

Built with Xcode 11.6

Minimum iOS Version

iOS 13, due to the use of SwiftUI.

API

The app uses the free API from openweathermap.org to pull weather details. A sample API key is committed. Under normal circumstances this key would likely be hosted by a private API server.

UI

Views are built using Swift UI. As a consequence we are sort of forced into using Swift Combine here and there. I've minimized usage of its more complex operators to keep things easy to understand and easy to extend.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages