This app uses Weather API to fetch weather data and features MVVM architecture, SwiftUI, local-package-based modular design and comprehensive unit tests.
Follow these steps to get started:
-
Clone the Repository
git clone https://github.com/wdesimini/Weather.git cd weather -
Open the Project in Xcode Open the
.xcodeprojfile in Xcode. -
Add Your API Key
- Navigate to
APIService.swiftlocated in theNetworkingpackage. - Replace
WEATHER_API_KEYwith your actual API key:public enum APIEnvironment { public static let key = "WEATHER_API_KEY" }
- Navigate to
-
Run the App
- Select a simulator or a connected device.
- Build and run the app using the play button in Xcode or by pressing
Cmd + R.
Uses a combination of dependency-injected @Observable ViewModels and async/await-based Services.
The project is divided into reusable Swift packages, making it easier to maintain, scale, and test.
Includes unit tests for ViewModels and Services using the XCTest framework. Mock services are provided to test ViewModels in isolation.