A minimal MVVM example flow with unit tests.
- Run
pod install - Open
MVVM.xcworkspace - Build and run the MVVM scheme.
WeatherAPI.com key is hardcoded in MVVMNetwork/WeatherAPIConfiguration.swift for local development.
- MVVMDomain — entities, UI models, UseCases, repository protocols
- MVVMNetwork — DTOs, URLSession client, repository implementation, bookmark storage
- MVVM — ViewControllers / ViewModels / Navigators
- WeatherList — Hanoi historical weather in a
UITableView, filterable by 7 days / 30 days / bookmarked - WeatherDetail — full day detail with bookmark toggle
- Test coverage is almost 80% (unit tests only)
xcodebuild test -workspace MVVM.xcworkspace -scheme MVVM \
-destination 'platform=iOS Simulator,name=iPhone 17' \
-only-testing:MVVMTests \
-enableCodeCoverage YES