title: SwiftUI Unknown Attribute 'Observable Object'
body: <p>So I'm getting the error Unknown attribute <code>ObservableObject</code> next to the <code>@ObservableObject var dataSource = DataSource()</code> call below. the <code>ObservableObject</code> worked perfectly a couple days ago in another project but not anymore.</p>
  
  <pre><code>import SwiftUI
  import Combine
  
  
  class DataSource: ObservableObject {
  
      var willChange = PassthroughSubject&lt;Void,Never&gt;()
  
  
      var expenses = [Expense]() {
          willSet { willChange.send() }
      }
      var savingsItems = [SavingsItem](){
          willSet { willChange.send() }
      }
  
      //@State var monthlyIncomeText: String
      //var monthlyIncome: Int = 1364
  
  
      init(){
          addNewExpense(withName: "Spotify", price: 14)
  
      }
  
      func addNewExpense(withName name: String, price: Int){
          let newExpense = Expense(name: name, price: price)
          expenses.append(newExpense)
      }
  
       func addNewSavingsItem(withName name: String, price: Int, percentage: Double){
          let newSavingsItem = SavingsItem(name: name, price: price, timeTilCompletion: 0, percentage: percentage)
          savingsItems.append(newSavingsItem)
      }
  }
  
  struct ContentView: View {
  
      @ObservableObject var dataSource = DataSource()
  
      var body: some View {
          VStack{
              Text("Expenses")
              List(dataSource.expenses) { expense in
                  ExpenseRow(expense: expense)
              }
          } 
      } 
  }
  </code></pre>
  
  <p>Could anyone help?</p>