Hechio / Forecast

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Forecast

Test for Senior iOS Engineer position.

Table of Contents

Prerequisite

This app has been built using Xcode 14. XCode automatically manages signing but if you face problem while running the app, go to the project directory, under Signing $ Capabilities, and add your developer team account.

The App

The app displays the current weather at the user’s location and a 5-day forecast from Open Weather API. You may need to get apiKey from Open Weather API and add it to apiKey variable in the OpenWeatherApiService class.

class OpenWeatherApiService {
......other code.....
private let apiKey = "ADD YOUR API KEY HERE"

Additional Features

a. The ability to save different weather locations as favourites.
b. The ability to view a list of favourites.
c. The ability to get extra information about a specific location Using something Google Places API.
d. The ability to see weather information while the application is offline.
e. Allow the user to view saved locations on a map.

Languages

The project has been written in Swift language and design using UIKit and SwiftUI. It uses URLSession with Combine for network requests.

Architecture

The project is meticulously crafted adhering to the MVVM (Model-View-ViewModel) architectural pattern, a cornerstone of modern app development. MVVM fosters the decoupling of concerns, paving the way for simplified testing and maintenance.

MVVM implementation

* Data Initialization: Upon the app's initial launch, the backend API service is summoned to retrieve current weather and the % day forecast data. This data is stored locally using the CoreData database.

* Offline Resilience: In scenarios where internet connectivity is unavailable, the stored data within the local cache becomes the go-to source of information, ensuring that the user experience remains uninterrupted.

* ViewModel Dynamics: The ViewModel plays a pivotal role in this architectural composition of orchestrating the interaction between the Model (data) and the View (UI). It updates the UI in response to data changes.

Incorporating these technical strategies ensures that the project aligns with contemporary architectural best practices, fostering modularity, testability, and overall software quality.

Testing and Testing

All tests are located within the iOS Test package. The execution of these tests is handled using XCTest. To run tests using fastlane run fastlane test command in your CL. Test automation has also been demonstrated using CircleCI.

ScreenShots

Video Recording of the App

Untitled.mp4

About


Languages

Language:Swift 90.1%Language:HTML 9.3%Language:Ruby 0.6%