Skip to content

A relatively simple iOS app that allows to check the current weather for any city in the world. Developed using MVVM design pattern.

Notifications You must be signed in to change notification settings

ashishbl86/World-Weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

World Weather

World Weather is a relatively simple iOS app that allows you to check the current weather for any city in the world.

How To Use

In the search bar, start to type the city name for which you want to see the weather. As you type, you will get city names below the search bar. Tap the city name you want to see the weather for and it will show on the screen.

General Info

This project is my first step in learning MVVM design pattern for iOS. In this app I am using the simple approach of Boxing to bind the View to the ViewModel. The goal is to upgrade the app to use RxSwift.

Weather data is pulled from free Web APIs from openweathermap.org. To use the app, you would have to create an account with openweathermap.org and get the API key. Set the API key as an environment variable with name OpenWeatherApiKey.

From openweathermap.org, a JSON file is also available which has names of all the cities for which the weather data is available from their API. This app uses that JSON to provide the cities names.

Automated Testing

One of the main advantages of MVVM is improved testability.

So also included in this project are unit tests of the weather view model. To testing binding of views to viewModel, the test cases use XCTestExpectation to test async calls.

Screenshots

Weather City name suggestions Weather
screenshot screenshot screenshot

About

A relatively simple iOS app that allows to check the current weather for any city in the world. Developed using MVVM design pattern.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages