iOS Weather Forecast App (SwiftUI + MVVM + Combine + URLSession async/await + CoreData)
- Display the weather for the selected city
- Swipe left / right to switch between cities
- Add, save cities locally, get city location
- City name autocompletion
- Get key for Google Places API
- Replace 'GooglePlacesAPIKey' in 'Info.plist' with your key
- iOS 16+
- Swift, SwiftUI, Combine, MVVM
- async / await, URLSession
- CoreData
- SPM
- MVVM, see templates folder
- Model consists of small Repositories
- Model is shared across modules using EnvironmentObject
- Repositories use network Services or CoreData
- Repositories are injected to ViewModels
- ViewModels are injected to Views as @StateObject
- Each Repository holds
LoadingStates(idle, data, error)
for it's data and state - View and ViewModel can delegate routing to Router if there are many routes from a View
- Errors are passed using a
LoadingState
and displayed usingerrorPopup
ViewModifier (see ErrorHandling.md)