Group Group Group Group Group Group Group Group Group

MVVM with Combine Tutorial for iOS | raywenderlich.com

In this MVVM with Combine Tutorial, you’ll learn how to get started using the Combine framework along with SwiftUI to build an app using the MVVM pattern


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4161005-mvvm-with-combine-tutorial-for-ios

There is a bug in the DailyWeatherRowViewModel class in the Starter code. It doesn’t have the proper value defined for the id so if you search for a second city, the display will not update but rather show results for the first city searched. It is correct in the Final code. Please fix this to save developers from going crazy thinking they did something wrong while following the tutorial.

@mattwill09, Thank you for posting this, I was just about to ask if anyone else was facing the issue where the temperatures are not being updated. I suppose this supports the notion that mvvm is more testable because we can apply unit tests to the model. I suppose no value is too simple to be unit tested.

My apologies. I found this bug during my final edit pass and thought I had fixed it in both places but must have grabbed the wrong starter project when I updated the materials. It’s fixed now.

1 Like