title: WidgetKit @StateObject not updating View
body: <p>I'm having trouble understanding how to make my <code>SwiftUI</code> data model example work with my Widget. It's working in my test app just fine, I observe changes immediately. When I attempt the Widget, I can see the data being printed in console but no changes are happening in my <code>View</code> in <code>WidgetKit</code>. I'm using a <code>ObservableObject</code> class and <code>@Published</code> variables. I've attempted to use a <code>@StateObject</code>, <code>@ObservedObject</code> and an <code>@EnvironmentObject</code> and the same results. Always results in No game today. My data model is <code>Combine</code> related, not sure if that has anything to do with why I can't see data changes in my <code>WidgetKit</code>'s <code>View</code>.</p>
  <p><strong>SwiftUI App example working</strong></p>
  <pre class="lang-swift prettyprint-override"><code>struct ContentView: View {
      @ObservedObject var data = CombineData()
      @State private var showSortSheet: Bool = false
      @State private var nhlTeams: TeamOrder = .NewYorkIslanders
      
      var body: some View {
          NavigationView {
              VStack(alignment: .leading) {
                  if data.schedule?.dates.first != nil {
                      Text(&quot;Game today&quot;)
                  } else {
                      Text(&quot;No game today&quot;)
                  }
              }
              .listStyle(PlainListStyle())
              .navigationBarTitle(Text(&quot;&quot;), displayMode: .inline)
              .navigationBarItems(leading: HStack {
                  Button(action: {
                      self.showSortSheet.toggle()
                  }) {
                      HStack {
                          Image(systemName: &quot;arrow.up.arrow.down&quot;)
                      }
                  }
              })
              .actionSheet(isPresented: $showSortSheet) {
                  ActionSheet(title: Text(&quot;Teams:&quot;), buttons: [TeamOrder.NewYorkIslanders, TeamOrder.MontrealCanadiens].map { method in
                      ActionSheet.Button.default(Text(&quot;\(method.rawValue)&quot;)) {
                          self.nhlTeams = method
                          data.fetchSchedule(self.nhlTeams.rawValue)
                          print(&quot;\(self.nhlTeams.rawValue)&quot;)
                      }
                  })
              }
              .onAppear {
                  data.fetchSchedule(self.nhlTeams.rawValue)
              }
          }
      }
  }
  </code></pre>
  <p><strong>Example Widget <code>@StateObject</code> (No data changes)</strong></p>
  <pre class="lang-swift prettyprint-override"><code>struct ExampleEntryView : View {
      var entry: Provider.Entry
      @Environment(\.widgetFamily) var widgetFamily
      @StateObject var model = CombineData()
      @ObservedObject var model = CombineData()
      /*@EnvironmentObject private var model: CombineData*/
      var body: some View {
          VStack(alignment: .leading) {
              if model.schedule?.dates.first != nil {
                  Text(&quot;Game today&quot;)
              } else {
                  Text(&quot;No game today&quot;)
              }
          }
          .onAppear {
              model.fetchSchedule(entry.configuration.teams.rawValue) {
                  WidgetCenter.shared.reloadTimelines(ofKind: &quot;NHL_Widget&quot;)
              }
          }
      }
  }
  </code></pre>
  <p><strong>Example Widget 2 TimelineEntry (No data changes)</strong></p>
  <pre class="lang-swift prettyprint-override"><code>struct SimpleEntry: TimelineEntry {
      let date: Date
      let configuration: ConfigurationIntent
      let model: CombineData
  }
  
  struct Provider: IntentTimelineProvider {
      
      func getTimeline(for configuration: ConfigurationIntent, in context: Context, completion: @escaping (Timeline&lt;Entry&gt;) -&gt; ()) {
          var entries: [SimpleEntry] = []
          let currentDate = Date()
          let model = CombineData()
          let entryDate = Calendar.current.date(byAdding: .minute, value: 1, to: currentDate)!
          let entry = SimpleEntry(date: entryDate, configuration: configuration, model: model)
          entries.append(entry)
          let timeline = Timeline(entries: entries, policy: .atEnd)
          model.fetchSchedule(entry.configuration.teams.rawValue) {
              completion(timeline)
          }
      }
  }
  
  struct ExampleEntryView : View {
      var entry: Provider.Entry
      @Environment(\.widgetFamily) var widgetFamily
      var body: some View {
          VStack(alignment: .leading) {
              if entry.model.schedule?.dates.first != nil {
                  Text(&quot;Game today&quot;)
              } else {
                  Text(&quot;No game today&quot;)
              }
          }
      }
  }
  </code></pre>